add ajax polling for server-side logout