@RequestMapping(value = "/profile", method = RequestMethod.POST)
 @ResponseStatus(HttpStatus.OK)
 public void updateProfile(UserForm form) {
   User user = userService.findOne(SecurityUtils.getCurrentUserId());
   user.setFirstName(form.getFirstName());
   user.setLastName(form.getLastName());
   user.setEmail(form.getEmail());
   userService.save(user);
   SecurityUtils.updateCurrentUser(user);
 }
 @RequestMapping(value = "/profile", method = RequestMethod.GET)
 @ResponseBody
 public UserForm getProfile() {
   return new UserForm(SecurityUtils.getCurrentUser());
 }