Fixed race condition when logging out and is_auth not set but still loading all modules