title: How to know if user is logged in with passport.js?
body: <p>I've been reading <code>passport.js</code> info and samples for two days, but I'm not sure after that I did all the process of authenticating. </p>
  
  <p>How do I know if I'm logged in, for example, I'll have a navigation bar with a login or logout button, is there some variable like code below?</p>
  
  <pre><code>if (login)
     &lt;button&gt;logout&lt;/button&gt;
  else 
     &lt;button&gt;login&lt;/button&gt;
  </code></pre>