fix problem where not logged in