change auth flag to rootScope