Check if user has logged in on client side
<p>Is there a safe way to check if the user has logged into the application rather than checking if "sid" cookie exists in user's machine ?</p>

<p>I want to allow the user to proceed on certain links on a page only if they have logged in.</p>

<p>I do the login validation on the server side but want to avoid the request trip.</p>

<p>Pure JS or JQuery solution would be appreciated.</p>

<p>Thank you.</p>