is_authenticated logic for preventing model error