public bool ValidateUser(string login, string password) { var user = userRepository.FindUserByLogin(login); return(user != null && cryptoManager.VarifyHash(user.Password, password)); }