User model based logins (#1)

User model created, hashing and hash comparison functions written and
UserIdentity classes updated to work with the new User model.