There are a lot of unknowns here, but yes a service seems like the right answer.
Basically you'll inject the service into both of your controllers and then update a value in the service from controllerB. Then in controller a you should have a watch on that service value and update according when it changes.
Simple service implementation
angular.module('services.auth', [])
.service('AuthService', function() {
return {
loggedIn: false
};
});
Although I would also suggest moving what ever you are doing in controller be that is interacting with the server to the service as well. Keep $http out of your controllers.
Gordon