HttpServletRequest request) throws Exception {
if (checkAuthorisation(UserModule.AUTH_LOGIN_AS)) {
session.setAttribute(UserModule.SESSION_LOGIN_AS_ADMIN, getUser());
ZeroUser selectedUser = userDao.findById(selected);
SpringUserDetails userDetails = new SpringUserDetails(selectedUser);
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(userDetails, selectedUser.getPassword());
SecurityContextHolder.getContext().setAuthentication(token);
session.removeAttribute("zero_componentManager");
session.removeAttribute(ZeroConstants.MENU_KEY);