Define AuthService and test