Never again write any login password logic. Generate all necessary components in your database using the following: cd c:\Windows\Microsoft.NET\Framework\v4.0.30319 c:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regsql.exe -A all -C "your_sql_connection_string" Start adding the following features: Membership Profile RoleManager Personalization SqlWebEventProvider script takes care of all and you have a login engine .. take it to next level integrating it with Facebook, Twitter etc..