protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception {
LoginForm form = (LoginForm) command;
String username = form.getUsername();
String password = form.getPassword();
User user = this.userService.getUserAccount(username, password);
if (user != null) {
this.userHolder.setUser(user);
this.applicationEventPublisher.publishEvent(new LoginEvent(this, request.getSession(), user));
return new AjaxModelAndView(this.getSuccessView(), errors);
} else {