public Member Authenticate(string username, string password)
{
var entity = _repository.Get(p => p.Username == username);
if (entity == null)
return null;
var passwordHash = PasswordGenerator.GetHashPassword(password);
if (!string.Equals(passwordHash, password))
return null;
return entity;
}