fixed helper method error when not logged in