title: Ionic 2 firebase listener , adding reference to login page
body: <p>Need to add a reference to loginpage so that it can be pushed to the front of the stack. The firebase onAuthStateChanged is initiated on the page that loads after login page.</p>
  
  <pre><code>firebase.onAuthStateChanged(function(user){
    if(!user){
      this.nav.setRoot(LoginPage);
    }
  });
  </code></pre>
  
  <p>This is not working. I don't know why.
  i tried calling this from a service its does not work either.
  I cant add this code to app.component.ts as there are a few pages which doesn't require the user to be logged in.</p>