title: How to prevent concurrent login for a web application using express-session
body: <p>I am creating a web application which will be used by App's Administrators and for security reasons we don't want to allow multiple active logins from a single user at any point of time.</p>
  
  <p>I am storing session data in the web browser's <code>cookie</code> and want backend to have active user's information who are currently logged in to the application so that on successful login request I can find out if this particular user already has an active session. If that is possible then I can block the login for that user.</p>
  
  <p>One way to do that is storing <code>IsLoggedIn</code> in the <code>Database</code> with <code>LastLoginTime</code> and on each login, I can use this two flags to identify if an active session exists.</p>
  
  <p>Open to other better solutions if any</p>