angularjs , wait for authorization result before go to next controllers
<p>Hello i have simple LoginService that looks like that:</p>

<pre><code>this.notifyAuthorization = function() {
    console.log('notifyAuthorization()');

    $http({
        url: 'app/?cmd=authorization/',

    }).then(function (response) { console.log('LoginStatusResult: '); console.log(response.data);
        var data = response.data;

        if(data.hash !== undefined) {
            $rootScope.loginStatus= true;
            hash = data.hash;
        }
    });
};
</code></pre>

<p>here is the call for the service</p>

<pre><code>app.run(function($rootScope, $location, LoginService) {
    LoginService.notifyAuthorization();
    console.log('notifyAuthorization Finished');
});
</code></pre>

<p>Before seeing <code>LoginStatusResult</code> i see <code>notifyAuthorization Finished</code>
and other controllers are initialized that should know the LoginStatus so how to solve this ? or is there a better practice ?
Thanks</p>