@Override
    public void doPost(HttpServletRequest request,
                       HttpServletResponse response) throws ServletException, IOException {
        switch (request.getPathInfo()) {
            case Pages.AUTH_PAGE:
                doAuthenticate(request, response);
                break;
            case Pages.REG_PAGE:
                doRegister(request, response);
                break;
            default:
                response.sendRedirect(Pages.MAIN_PAGE);
                break;
        }
    }