public Authentication login(String username, String password, String ip,
HttpServletRequest request, HttpServletResponse response,
SessionProvider session) throws UsernameNotFoundException,
BadCredentialsException {
UnifiedUser user = unifiedUserMng.login(username, password, ip);
Authentication auth = new Authentication();
auth.setUid(user.getId());
auth.setUsername(user.getUsername());
auth.setEmail(user.getEmail());
auth.setLoginIp(ip);
save(auth);
session.setAttribute(request, response, AUTH_KEY, auth.getId());
return auth;
}