code: @RequestMapping(value = "/userLogin", method = RequestMethod.POST)
      @ResponseBody
      public JsonObject<?> login(@RequestParam(value = "username", required = true) String username,
                                 @RequestParam(value = "password", required = true) String password,
                                 @RequestParam(value = "remember", required = true) boolean remember,
                                 HttpServletResponse response) {
          JsonObject<?> ret = JsonObject.create();
          if (LoginValidator.isValid(username, password)) {
              CookieUtils.setCookieValue(response, UserWebConstant.CookieKey.USERNAME.getValue(),
                      username, CookieExpireInHour.getExpireInHour(remember));
              CookieUtils.setCookieValue(response, UserWebConstant.CookieKey.PWDMD5.getValue(),
                      password, CookieExpireInHour.getExpireInHour(remember));
              LOG.info("Logon with username=" + username);
              ret.addData("id", UserWebConstant.USERMAP.get(username).getUserId());
              ret.addData("name", username);
          } else {
              ret.setStatus(GlobalResponseStatusMsg.LOGIN_FAILED.getCode());
              ret.addStatusInfo(GlobalResponseStatusMsg.LOGIN_FAILED.getMessage().getMessage());
          }
          return ret;
      }
docs: 登陆
  
  @param username 用户名
  @param password 密码md5
  @param remember 是否记住密码
  @param response 返回response
  
  @return JsonObject