title: Navbar not updating username after login with another account
body: <p>I am creating login page,data is coming from database.i have used 2 login account. i login with one username and then in navbar i am displaying username, after when i logged out and login with another username it is showing the previous username. and when i press f5 then it is displaying correct username, pls help me i dont want to refresh the page.</p>
  
  <p>in navbar component i am fetching data in ngOnInit</p>
  
  <pre><code>ngOnInit() {
          if(this.auth.loggedIn()){
              this.auth.getProfile().subscribe(profile=&gt;{
                  this.user=profile.user;
              },
              err=&gt;{
                  console.log(err);
                  return false;
              });
          }
  }   
  </code></pre>
  
  <p>here's template  </p>
  
  <pre><code>  &lt;li *ngIf="auth.loggedIn()"&gt;
            &lt;a href="#&gt;{{user?.name | uppercase}}&lt;/a&gt;
  &lt;/li&gt;
  </code></pre>