public bool Authenticate(string email, string password)
{
User user = GetUserByEmail(email);
if (user != null)
{
String passwd = CreatePasswordHash(password, CreateSalt(email));
if (user.Password.Equals(passwd))
{
FormsAuthentication.SetAuthCookie(email, false);
return true;
}
}
return false;
}