fixed not logged in bug