jquery - ajax testing if logged in?
<p>So I already have the website working (I'm not working from scratch). The problem I have is that a lot of the content is available only if you're logged in (pretty much everything). So sometimes I have a modal popup which retrieved (using ajax) something to display.</p>

<p>In my server side code, if someone's not logged in, they are redirected to the sign-in page.</p>

<p>This produces a strange effect, as if someone is on a page and is no longer logged in, then the modal that pops up tries to display the sign in page.</p>

<p>What possibilities are there for straightening this out?</p>

<p>The only thing I can think of is having a url that checks if they're logged in and returns that, and along with every ajax request, I could check if they're logged in or not and the Javascript could act accordingly.</p>

<p>I'm hoping there's some other possibilities.</p>
