@Override
  public boolean isUserValid(String username, String password) {
    UserVO userVO = userApplication.findByUserAccount(username);

    if (userVO == null) {
      return false;
    }

    if (passwordEncoder.encode(password).equals(userVO.getUserPassword())) {
      return true;
    }

    return false;
  }
 public UserVO modifyPassword(Long id, UserVO user) {
   UserVO userVO = userApplication.getUser(id);
   userVO.setUserPassword(passwordEncoder.encode(user.getUserPassword()));
   userApplication.updatePassword(userVO, passwordEncoder.encode(user.getOldPassword()));
   return userApplication.getUser(id);
 }
 public UserVO createUser(UserVO user) {
   user.setValid(true);
   user.setUserPassword(passwordEncoder.encode(user.getUserPassword()));
   UserVO result = userApplication.saveUser(user);
   return result;
 }