title: Login session timeout
body: <p>I would like to set a timeout for the login session of x minutes. </p>
  
  <p>I have created a <code>SessionListener</code>:</p>
  
  <pre><code>public class SessionListener implements HttpSessionListener {
  
      @Override
      public void sessionCreated(HttpSessionEvent event) {
          event.getSession().setMaxInactiveInterval(60 *15);
      }
  
      @Override
      public void sessionDestroyed(HttpSessionEvent event) { }
  }
  </code></pre>
  
  <p>Which create sessions with a timeout of 15 minutes but I would like to set this timeout once a user is login. Otherwise, if you wait more than 15 minutes in the login page and try to login, the session has been destroyed and you won't be able to login (and AccessDeniedHandler class is launched).</p>