Logout Ajax detection fix