@RequestMapping(method = {RequestMethod.POST})
    public ResponseEntity<String> userAdd(@RequestParam(required = false) String name,
                                          @RequestParam String account,
                                          @RequestParam String password){
        if(password==null||password.isEmpty()){
            return new ResponseEntity<>("password can't be null or empty",HttpStatus.BAD_REQUEST);
        }
        if(account==null||account.isEmpty()){
            return new ResponseEntity<>("account can't be null or empty",HttpStatus.BAD_REQUEST);
        }
        User user = new User();
        user.setName(name);
        user.setAccount(account);

        JsonObject resp = new JsonObject();

        PasswordEncryptor passwordEncryptor = new BasicPasswordEncryptor();
        String encryptedText = passwordEncryptor.encryptPassword(password);
        user.setPassword(encryptedText.getBytes());

        User addedU = null;
        try{
            addedU = userManager.addUser(user);
        }catch (UserExistsException uee){
            String respMsg = "user with account["+user.getAccount()+"] already exists.";
            resp.addProperty("msg",respMsg);
            LOG.warn(respMsg);
            return new ResponseEntity<>(resp.toString(),HttpStatus.BAD_REQUEST);
        }

        JsonObject jsonUser = new JsonObject();
        jsonUser.addProperty("id",addedU.getId());

        return new ResponseEntity<>(jsonUser.toString(),HttpStatus.OK);
    }