prevent ajax redirect when user is sporadically logged out