title: NGRX effect using firestore stateChanges method completes due to auth error after logout
body: <p>I am building a small Angular chat app with AngularFire2. 
  Once the user logs out, all of my NGRX effects that are using AngularFire´s <code>.stateChanges()</code> &amp; <code>.valueChanges()</code> methodes complete due to an auth error. How is it possible to keep the effects "alive" after logout?  </p>
  
  <p>I´ve already tried something like using the RXJS operator <code>takeUntil</code> with some kind of auth Observable that reflects if the user is logged in. Same thing for <code>takeWhile</code>. I´ve alos tried <code>catchError</code> as last operator and inside an extra <code>pipe()</code> after the <code>firestoreService.getUserFriends</code> method.</p>
  
  <p>The NGRX Effect:</p>
  
  <pre><code>@Effect()
  query$ = this.actions$.pipe(
      ofType&lt;Query&gt;(SocialActionTypes.Query),
      withLatestFrom(this.store$),
      map(([action, storeState]) =&gt; {
        return storeState.auth.user.uid;
      }),
      exhaustMap(uid =&gt; this.firestoreService.getUserFriends(uid)),
      mergeMap(actions =&gt; actions),
      map(action =&gt; {
        return {
          type: `[Social] Friend ${action.type}`,
          payload: {
            ...action.payload.doc.data(),
            id: action.payload.doc.id
          }
        };
      })
  );
  </code></pre>
  
  <p>The firestoreService.getUserFriends method:</p>
  
  <pre><code>getUserFriends(uid: string) {
    return this.afStore
      .collection&lt;Friend&gt;(`social/${uid}/friends`)
      .stateChanges();
  }
  </code></pre>