title: Angular Firebase authentication state always return null
body: <p>I tried to create anonymous login to firebase in my ionic app.
  here is my authentication service.</p>
  
  <pre><code>@Injectable()
  export class AuthService {
      public authState: any = null;
      public UserId: any;
  
      constructor(public angularFireAuth: AngularFireAuth,
          private firestoreUser: FirestoreUserProvider) {
          this.angularFireAuth.authState.subscribe((auth) =&gt; {
              this.authState = auth
              if (this.authState)
                  this.UserId = this.authState.uid;
          });
      }
  
      get isUserAnonymousLoggedIn(): boolean {
          return (this.authState !== null) ? this.authState.isAnonymous : false
      }
  
      get currentUserId(): string {
          return (this.authState !== null) ? this.authState.uid : '';
      }
  
      anonymousLogin() {
          return this.angularFireAuth.auth.signInAnonymously()
              .then((user) =&gt; {
                  this.authState = user;
                  this.updateUserData(user.uid);
              })
              .catch(error =&gt; console.log(error));
      }
  
      signOut(): void {
          this.angularFireAuth.auth.signOut();
      }
  
      updateUserData(UserId: any): void {
          this.firestoreUser.createUser(UserId);
      }
  }
  </code></pre>
  
  <p>While try to login the below code works fine, but the page refreshes and login page is shown again.</p>
  
  <pre><code>  this.authService.angularFireAuth.authState.subscribe(user =&gt; {
            if (!user) {
              console.log('user is not logged in!');
              this.navCtrl.setRoot(AnonymousLoginPage)
            }
          })
  </code></pre>
  
  <p>Means the subscribe method always return null. Any help?</p>