public bool LogOnUser(string userName, string password)
{
var user = this.userRepository.GetByName(userName);
if (user == null)
{
return false;
}
if (this.cryptoProvider.ComparePassword(user.Credentials.Passwordhash, user.Credentials.Salt, password) && user.Credentials.IsVerify)
{
FormsAuthentication.SetAuthCookie(user.UserName, true);
return true;
}
return false;
}