fixed not-logged-in error