title: Meteor and iron router, wait on login
body: <p>I have a <code>login</code> route. I made this hook on before the action :</p>
  
  <pre><code>onBeforeAction: function() {
  
      console.log(Meteor.user())
      console.log(this.route.name)
  
      // If the user is not logged and if we are not on the login page
      // Redirect the user to the login page
      if( !Meteor.user() &amp;&amp; this.route.name !== 'login' ) {
          Router.go('login');
      };
  
      // If the user is logged, take him out of the login page
      if( Meteor.user() &amp;&amp; this.route.name === 'login' ) {
          Router.go('newsletters.index');
      };
  }
  </code></pre>
  
  <p>But what about the login in time ?</p>
  
  <p>I would like to make the router wait if <code>Meteor.loggingIn()</code> is true. The <code>waitOn</code> is about the subscriptions and did not work.</p>
  
  <p>I'm pretty sure some else did that before :) </p>