title: how to know if someone is logged via javascript?
body: <p>in php i would do </p>
  
  <pre><code>if (isset($_COOKIE['user']) &amp;&amp; $_COOKIE['user'] == $valueFromDb)
   echo 'logged';
  </code></pre>
  
  <p>But in javascript how can I check it?</p>
  
  <p>Thanks</p>