title: Magento can not detect if customer is logged in or not
body: <p>This is my php file which I am calling using ajax function call. For test purpose I also tried it calling directly.</p>
  
  <pre><code>include "/srv/www/htdocs/magento/app/Mage.php";
  
  Mage::init();
  
  if(Mage::getSingleton('customer/session')-&gt;isLoggedIn())
  {
      echo 'Logged In';
  }
  else
  {
      echo 'Not Logged In';
  }
  </code></pre>
  
  <p>The code do not give any errors. I checked in apache error log. 
  The magento 1.6.1 version I am using failes to check if user is logged in or not.
  I tried to execute this code while the user is logged in and also when the user is NOT logged in.
  But this code output only the else statement that is "Nog logged in"
  Help please</p>