fixed not logged in issue