title: Can't access $rootScope from another controller
body: <p>Why can't I access the <code>$rootScope</code>, particulary the currentUser object and the <code>signedIn()</code> function from the RegistrationController?</p>
  
  <p>I'm trying to follow a tutorial example and I'm able to sucessfully set the <code>$rootScope.currentUser</code> variable in a service (Authentication), but when I try to access it from another controller (RegistrationController) I cannot access it.</p>
  
  <p>My understanding is that <code>$rootScope</code> is kind of a global variable that is accessible from all the app, is this correct?</p>
  
  <pre><code>myApp.controller('RegistrationController', 
      function($scope, $firebaseAuth, $location, Authentication, $rootScope){
  
      $scope.login = function() {
          Authentication.login($scope.user)
          .then(function(userReturned){
              console.log('registration.js: logged in user '+userReturned.uid);
              //console.log('registration.js: $rootScope.currentUser ahora es... ');
              //console.log($rootScope.currentUser);
              $location.path('/meetings');
          })
          .catch(function(error) {
              $scope.message = error.toString();
          });
      } //login
  
  
  }); //RegistrationController
  
  myApp.factory('Authentication', 
      function($firebase, $firebaseAuth, FIREBASE_URL, $location, $rootScope) {
      // using $firebaseAuth instead of SimpleLogin 
  
      var ref = new Firebase(FIREBASE_URL);
      var authObj = $firebaseAuth(ref);
  
      var myObject = {
          login : function(user) {
  
              return authObj.$authWithPassword({
                  email: user.email,
                  password: user.password
              })
              .then(function(authData){ 
                  console.log('authentication.js: logged in user '+ authData.uid);
  
                  var userRef = new Firebase(FIREBASE_URL + 'users/' + authData.uid);
                  var userObj = $firebase(userRef).$asObject();
  
                  userObj.$loaded().then(function() {
                      $rootScope.currentUser = userObj;
                  });
  
                  $rootScope.$broadcast('$firebaseAuth:authWithPassword',authData); // avisa al scope
  
                return authData;
            });
          }, //login
  
          signedIn: function() {
              //console.log(authObj);
              //console.log('authentication.js: signedIn function called and returned '+ (authObj.user != null) );
              return authObj.user != null;
          } // signedIn
  
      } //myObject
  
      // add signedIn to the $rootScope
      $rootScope.signedIn = function() {
          return myObject.signedIn();
      }
  
      return myObject;
  });
  </code></pre>