title: How make it work the session lifetime and remember me in Symfony2
body: <p>I want to have a timeout for the session.. ie 5 minutes. But I also want to have a remember me functionaliy with a timeout of 8 hours.</p>
  
  <p>So I set the session timeout in the config.yml with this:</p>
  
  <pre><code>session: 
      cookie_lifetime: 300
  </code></pre>
  
  <p>And then I set the remember me timeout in the security.yml with this:</p>
  
  <pre><code>firewalls:
      main:            
          remember_me:
              key: '%secret%'
              lifetime: 28800
              path: /
              domain: ~     
  </code></pre>
  
  <p>So, if I stay working within 5 minutes and then I log out, everything goes right. But, if I stay inactive for more than 5 minutes (session timeout) and then I log out, I am automatically authenticated with the remember me cookie. Therefore, if I want to logout, I have to click twice in the Logout link. </p>
  
  <p>How should I do to make them work together?</p>