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.
In my server side code, if someone's not logged in, they are redirected to the sign-in page.
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.
What possibilities are there for straightening this out?
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.
I'm hoping there's some other possibilities.