title: Protect Directories with Login NodeJS
body: <p>(A "follow up" of <a href="https://stackoverflow.com/questions/22295297/nodejs-session-authentication">NodeJS Session Authentication</a>)</p>
  
  <p>Using node, I'm using <code>app.get(...)</code> to <code>authenticate()</code> all my HTTP requests, which works very nicely, however, a work-around to this is the end-user simply inputs the URL into the browser.</p>
  
  <p>so I'm sending a request to <code>app.get("/onePlayer",authenticate ... )</code> and if you're logged in, redirect to <code>/one-player/index.html</code></p>
  
  <p>So somebody could simply put <code>/one-player/index.html</code> into the browser and suddenly, they've gotten around the login check.</p>
  
  <p>No big deal, I can just <code>app.get("/one-player/index.html" ... )</code>? Sure.. that works, but it means I would have to <code>app.get</code> EVERY FILE I would like login protected.</p>
  
  <p>How can I login protect all my files, with the option to exclude specific files/http requests (example: login.html and createAccount.html obviously don't need an account to access)?</p>