protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {

        String login = request.getParameter("login");
        String password = request.getParameter("password");
        String action = request.getParameter("action") == null ? "" : request.getParameter("action");

        // On récupere la session
        HttpSession session = request.getSession();

        if (action.equals("deco")) {
            session.setAttribute("isLoginOk", false);
            request.setAttribute("message", "vous avez bien été déconnecté.");
        } else if (login != null && password != null) {
            if (gestionnaireUtilisateurs.isLoginCorrect(login, password)) {
                session.setAttribute("isLoginOk", true);
                request.setAttribute("message", "Bienvenue chez vous " + login + " !");
            } else {
                request.setAttribute("messageErreur", "Login ou mot de passe incorrect. Try again.");
            }
        }

        String forwardTo = "accueil.jsp";
        RequestDispatcher dp = request.getRequestDispatcher(forwardTo);

        dp.forward(request, response);
    }