use $rootScope to persist authorized state with memoization