catch (UserAlreadyLoggedInException ex) {
throw new UserAlreadyLoggedInException("Already logged in as "
+ ((User) identity.getAccount()).getLoginName());
}
catch (RuntimeException ex) {
throw new AuthenticationException("An error occurred during authentication.", ex);
}
if (result == Identity.AuthenticationResult.SUCCESS) {
final User picketLinkUser = (User) identity.getAccount();
final TodoListUser todoListUser = lookupTodoListUser(picketLinkUser.getEmail());