Fixed issues when user was not logged in