private AuthenticationException getAuthException(Map<String, String> pairs) {
String errorName = pairs.get("Error");
if ("BadAuthentication".equals(errorName)) {
return new InvalidCredentialsException("Invalid credentials");
} else if ("AccountDeleted".equals(errorName)) {
return new AccountDeletedException("Account deleted");
} else if ("AccountDisabled".equals(errorName)) {