if (account == null) {
//Retrieve and store the original URL.
String url = request.getRequestURL().toString();
WebUtils.setSessionAttribute(request, LoginController.REQUESTED_URL, url);
throw new AuthenticationException("Authentication required.", "authentication.required");
}
return true;
}