title: The right time to remove subscription for observable that is only used once
body: <p>I have the following login function that I want to use just once to login as oppose to sit there an listen for data forever. 
  So I am looking for the right time to call the unsubscribe method. 
  At the moment, I am calling the unsubscribe method right after I get a result or error. This would make sense as the observable is no longer required.</p>
  
  <p>However... what happens if I have a really slow internet and here is what happens.</p>
  
  <p>The code executes the observable and waits for a data to come back from firebase (Say for 1 minute for arguments sake).
  During this wait period, say if someone modifies this entry in firebase, I believe firebase will think, "hey someone is still listening and there is a change, so I better emmit the update to this person"</p>
  
  <p>So at this point, I would be waiting for two sets of data to come back, the first one and the updated one.</p>
  
  <p>So would I get two data printed out of the console or will this not happen?</p>
  
  <pre><code>onLogin() {
      // loginWithEmailPassword returns firebase.promise&lt;AuthState&gt;
      this.userService.loginWithEmailPassword(this.loginForm.value.email, this.loginForm.value.password)
      .then(data =&gt; {
  
          // if the user is logged in, go and retreive user information
          // getUserInformation returns Observable&lt;any&gt;
          let subscription_getUserInformation = this.userService.getUserInformation(data.uid)
          .subscribe(result =&gt; {
  
              // user information received
              console.log(result)
  
              // remove Subscription
              subscription_getUserInformation.unsubscribe();
  
          }, error =&gt; {
              // something went wrong
              subscription_getUserInformation.unsubscribe();
          })
  
      }, error =&gt; {
          // something went wrong
      });
  }
  </code></pre>