Forgive me, I don't think I'm properly understanding. Let me just put a few examples on the table.
User A wants to stay logged in only for 10 minutes. He stays on the site for 8 minutes, and then closes the browser. The session expires 2 minutes from now right?
User B wants to stay logged in forever. He closes and re-opens the browser many times per day. Does he remain logged in?
If I do what you're proposing, a session cookie will be created for a static length of time, regardless of the users wishes.
I understand that when the user submits to logout, I can destroy the session at that time. I'm just worried about session persistance across multiple openings of a browser window on the same computer. If I set a session cookie to expire in 6 hours, but a user only wants to stay logged in for 10 minutes, how do I do that?