In my current setup with Angular 1.5.6, my application consists of multiple modules, each having its own view and controller. I'm facing an issue where I need to watch $rootScope across all controllers due to a global variable '$rootScope.account'. Whenever a user refreshes the page, $rootScope.account gets cleared leading to crashes in the entire application. To handle this scenario, I am looking for a way to watch $rootScope.account on all modules so that I can redirect users to the login page upon refresh. One approach I have considered is creating a service that could be injected into each module. How can I achieve this seamlessly?