public async Task <Person> AuthenticateUserAsync(string login, string password) { var user = await _personRepository.GetByLoginAsync(login); if (user == null) { return(null); } if (logic.ComparePasswords(password, user)) { return(user); } return(null); }