This has very little to do with coldfusion in general...
Normaly you'd make a PHP/MySQL solution, where the user-info is stored in a database, and you use a PHP frontend to verify the user-login against their stored login info, then let the PHP change accordingly, if it's a successful login or a failure..
Take a breif look through the
PHP articles there are plenty of examples there, theres even a
Login article which might provide an example of what you're looking for...