private void getTimerPage(HttpServletResponse response, UserSession session, Map<String, Object> pageVariables) throws ServletException, IOException {
        Long userId = (session != null) ? session.getId() : null;
        if (userId != null) {
            pageVariables.put("time", new Date().toString());
            pageVariables.put("userId", userId);
            pageVariables.put("refreshPeriod", "1000");
            sendResponse(response, Templates.TIMER_TPL, pageVariables);
        } else {
            response.sendRedirect(Pages.MAIN_PAGE);
        }
    }