Logged out event javascript fix