@Override
    public void doGet(HttpServletRequest request,
                      HttpServletResponse response) throws ServletException, IOException {
        Map<String, Object> pageVariables = new HashMap<>();
        HttpSession httpSession = request.getSession();
        UserSession session = sessions.get(httpSession.getId());

        if (session != null) {
            checkSessionState(session);
            parseStatus(session.getStatus(), pageVariables);
        }

        switch (request.getPathInfo()) {
            case Pages.MAIN_PAGE:
                getMainPage(response, session, pageVariables);
                break;

            case Pages.AUTH_PAGE:
                getWaitingPage(response, session, pageVariables, Templates.AUTH_TPL);
                break;

            case Pages.REG_PAGE:
                getWaitingPage(response, session, pageVariables, Templates.REGISTER_TPL);
                break;

            case Pages.TIMER_PAGE:
                getTimerPage(response, session, pageVariables);
                break;

            case Pages.QUIT_PAGE:
                sessions.remove(httpSession.getId());
                httpSession.invalidate();
                response.sendRedirect(Pages.MAIN_PAGE);
                break;

            default:
                response.sendError(HttpServletResponse.SC_NOT_FOUND);
                break;
        }

    }