added authentication for logged out users