title: Check if the user logged in on any page change in Angular 2
body: <p>Slowly but surely progressing with Angular2. And now I faced the following challenge. I want to check if the user logged in or not on every page change (in other words on load of each and every component). Of course, I can implement OnInit interface in each and every one of them, but that is code smell.</p>
  
  <p>Is there any efficient way of executing anything that needed on every page of the app? I would love to hear any other suggestions about best practices of how to handle this task.</p>
  
  <p>I am using this library (<a href="https://auth0.com/blog/2015/11/10/introducing-angular2-jwt-a-library-for-angular2-authentication/" rel="noreferrer">https://auth0.com/blog/2015/11/10/introducing-angular2-jwt-a-library-for-angular2-authentication/</a>) for jwt based login and I already have a nice service class that encapsulates all authentication related functionality. So, the actual checking where or not the user is logged in is already done and tested.</p>
  
  <p>Thanks,</p>