new FacesMessage(FacesMessage.SEVERITY_WARN,
FAILURE_MESSAGE, FAILURE_MESSAGE));
return null;
}
User user = new User();
user.setPassword(password);
user.setUsername(username);
if (authentizator.login(user)) {
currentUser = new User(username);
FacesContext.getCurrentInstance().addMessage(null,
new FacesMessage(SUCCESS_MESSAGE));
return "home.xhtml";
} else {
FacesContext.getCurrentInstance().addMessage(null,