Attachment contains control task, let me know if something was missed. Features that weren't implemented because you did not ask them:
1. Encrypt credentials with server's public key before sending them over the wire ,
2. Password encryption in the database,
3. New user would be created in 'deactivated' state,
4. Confirmation letter would be sent for mail verification.
5. The user would be activated after answering to confirmation letter.
I modified standard login system commenting old operators thus comments are minor - system uses 90% of standard authentication code.
Database LoginDemo contains 3 tables:
1. RegisteredUsers - your data table expanded with bit field for activation, 2 users are there:
a. Petras (password 'cadilac'), role WebUser,
b. Gedas (password 'Zebra'), role Admin.
2. Roles - available roles; two roles are there: Admin and WebUser.
3. UserRoles M-M relation between RegisteredUsers and Roles.
Only passwords are case sensitive.
Requirements:
1. Visual Studio 2012,
2. MS SQL Server 2008 R2,
3. Package Ninject.
DB backup is inside ZIP file.