I had this exact same problem and have a (simple, effective, and secure) solution right here, under my belt. However, it may take a little time getting acquainted with the related code, for implementation (integration of the solution into your custom code context), and testing, so if you give me 2 or 3 days, and I solve it, you can pay me, otherwise you won't have to pay me anything (forget the milestones.) Sound good? :)