improved unit tests for AuthService