@SessionState(create = false)
private User loggedIn;
void onValidateFromLoginForm() {
if (loginForm.isValid()) {
User authenticated = authenticator.authenticate(user.getName(), user.getPassword());
if (authenticated == null) {
loginForm.recordError(messages.get("invalid-username-or-password"));
} else {
loggedIn = authenticated;