title: Working with Sessions in Express.js
body: <p>I need help understanding the concept of sessions for a web application. I am running a Node.js server with Express 3.0.</p>
  <h2>My goals are to:</h2>
  <ul>
  <li><p>Create a session for each user that logs in</p>
  </li>
  <li><p>Store this session and use it for validating if the user is already logged in (prevent two devices using the same user at the same time) and to limit access to certain pages (by matching session ID to some other data)</p>
  </li>
  </ul>
  <p>I will be using MemoryStore to save the sessions (seems easiest). If the above goals make sense can you provide a thorough explanation of how to achieve them?</p>