@GetMapping("/switch")
	public String switchUser(User user,
							 @RequestParam(defaultValue = "") String to,
							 HttpServletRequest request, HttpServletResponse response) {
		userService.evictUserCacheById(to);
		Cookie cookie = new Cookie("switchUser", to);
		cookie.setPath("/");
		// Delete Cookie if empty switchUser
		if (StringUtils.isEmpty(to)) {
			cookie.setMaxAge(0);
		}
		response.addCookie(cookie);
		return "redirect:" + StringUtils.defaultIfBlank(request.getHeader("referer"), "/");
	}
Switch user identity.

@param user     current user
@param to       the user to whom a user will switch
@param response response
@return redirect:/perftest/
ngrinder-controller/src/main/java/org/ngrinder/user/controller/UserController.java