title: Synchronously inject current user after login
body: <p>In my EmberJS application, I have a current user initializer, which injects the user into all controllers, routes, and views. It works great when logged in. I need the synchronous loading of the current user object so I can check some user permissions right off the bat.</p>
  
  <p>Here's my initializer:</p>
  
  <pre><code>App.CurrentUserInitializer - Ember.Initializer.extent({
  
      name: 'current-user',
      after: 'authentication',
  
      initialize: function(container, app) {
  
        var store = container.lookup('store:main');
  
        app.deferReadiness();
  
        store.find('user', 'me').then(function (user) {
  
          app.register('session:user', user, {instantiate: false});
  
          _.forEach(['route', 'controller', 'view'], function (place) {
            app.inject(place, 'currentUser', 'session:user');
          });
  
          app.advanceReadiness();
  
        }).catch(function () {
          app.advanceReadiness();
        });
      }
  });
  </code></pre>
  
  <p>Where this breaks down for me, is during login. When the app boots, the initializer is run, but the <code>/users/me</code> route returns a 401 error. If I don't catch the error and advanceReadiness, booting halts. By catching the error, the app boots, but the initializer isn't run again after login, so the current user isn't loaded.</p>
  
  <p>What are my options here? I can't use @marcoow's recommended method of adding a computed property to the Session, as I need the user loaded at boot time.</p>
  
  <p>I've tried forcing loading the user object on the IndexRoute as a hack, but that doesn't seem to work.</p>
  
  <p>Any tips are appreciated.</p>