private User processNewUser(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException, Base64Exception {
        //new user
        String encodedLoginEmail = request.getParameter(Constants.RequestParameter.LOGIN_NAME);
        String encodedPassword = request.getParameter(Constants.RequestParameter.PASSWORD);
        if (StringUtils.isEmpty(encodedLoginEmail)) {
            throw new AuthenticationException("encodedLoginEmail parameter is empty.", encodedLoginEmail, Constants.RequestParameter.LOGIN_NAME);
        }
        if (StringUtils.isEmpty(encodedPassword)) {
            throw new AuthenticationException("encodedPassword parameter is empty.", encodedPassword, Constants.RequestParameter.PASSWORD);
        }
        User user = createUserFromEncodedData(encodedLoginEmail, encodedPassword);
        auth(request, response, user);
        return new User(encodedLoginEmail, encodedPassword);
    }