Okay not sure how to word it on google so I came here.
I have a form that contains a submit button for a logout script. When you click it, if you watch the url bar you can see where the form takes you until my javascript redirect kicks in after the changes have taken effect on the session variables. What I cannot figure out is how facebook and others do this without changing pages and redirects you when the logout is done.