title: Express Session : terminate session on tab/browser close
body: <p>I need to terminate the user session or log user out when they close the browser or tab.
  Following is the code implemented to maintain session:</p>
  
  <pre><code>app.use(session({
    store: new RedisStore({
      url: REDIS_CONNECTION_URL,
    }),
    secret: 'COOKIE_SECRET', 
    name: 'COOKIE_NAME',
    resave: true, 
    saveUninitialized: false,
    rolling: true,
    cookie: {
      path: '/',
      httpOnly: true,
      maxAge: 'COOKIE_TIMEOUT',
    },
  }));
  </code></pre>
  
  <p>I have tried setting cookie.expires to true but that doesn't help.</p>