title: Route dispatch never rendered. Did you forget to call this.next() in an onBeforeAction?
body: <p>I'm doing a logout function right now in Meteor and I noticed something wierd. When I'm on my login page or even when logging out and redirected to login page there is an error on my Google console: </p>
  
  <p>Route dispatch never rendered. Did you forget to call this.next() in an onBeforeAction?</p>
  
  <p>Here's my code:</p>
  
  <p><code>router.js</code></p>
  
  <pre><code>var routerExcepts = [
    "login",
    "register"
  ];
  
  
  Router.onBeforeAction(function() {
    if (Router.current().route.getName() != "adminlogin.:_id") {
      if (!Meteor.userId()) {
        return this.redirect("/login");
      } else {
        this.next();
      }
    }
  }, {
    except: routerExcepts
  });
  </code></pre>
  
  <p><code>home.html:</code></p>
  
  <pre><code>&lt;template name="home"&gt;
    &lt;div class="container"&gt;
       &lt;a href="#" id="item-logout" class="btn btn-default btn-lg btn-block"&gt;Logout&lt;/a&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p><code>home.js:</code></p>
  
  <pre><code>Template.home.events({
    "click #item-logout": function() {
      Meteor.logout();
    }
  });
  </code></pre>
  
  <p>Does anybody have an idea what's going on with my code? I know this is kind of duplicate to other questions and I tried the solutions offered on those answered questions but it doesn't solve my problem.</p>
  
  <p>Thanks in advance.</p>