Fixed authentication for logged-out users.