I have an existing website and require the following. Whenever the user clicks on the download button on the website, the user has to enter an authentication code. A pop up should appear for the authentication. The website has to authenticate the code and if the code is correct, direct the user to the download page. In case it is not, the webpage needs to provide a suitable message and close the pop up. We need to have a set of codes which we can give to at least 1000 users and these codes should be placed at the back end of the website.
The list of codes should be available so that they can be mailed to individual users.