log.info("Upgrade email '" + email + "' to federated successfully.");
} catch (AccountException e) {
log.severe("Failed to upgrade email '" + email + "' with error: " + e.getErrorCode());
}
// Refresh Account object in session
Account account = Context.getAccountService().getAccountByEmail(email);
request.setAccountInDB(account);
Context.getSessionManager().setSessionAccount(request.getHttpServletRequest(),
request.getHttpServletResponse(), account);
}