title: NodeJS - Session handling WITHOUT express
body: <p>I have built my app, I used plain JS on NodeJS and it is a single-page app. I didn't use express.</p>
  
  <p>First the user needs to log in. The login-data is sent via websocket to the server and there the credentials are checked against a MySql-DB. If they are correct, the loggedIn-content is generated and sent back to the client, where it is displayed.</p>
  
  <p>Now when a user is already logged in, and then refreshes the browser, he lands on the initial state of the app, and needs to log in again. </p>
  
  <p>how can I fix this?</p>
  
  <p>I read a lot about session-handling in NodeJS, but most articles include express, which confuses me to understand this whole concept.</p>