title: nodejs, how to check if session is defined on every page
body: <p>I am using express to develop a simple website.
  I just get confused about how to make the nodejs check session before rendering any page, so that if a user did not login, he cannot see anything.</p>
  
  <p>I think in rails it is quite simple, just add some codes in the application controller. But how to handle such thing in nodejs?</p>