Handle not-logged-in case for layout.