title: Action dispatch the second time doesn't effect in RxJS and Angular 6
body: <p>I have an @Effect that manage the login. The steps are the following:</p>
  
  <ul>
  <li>Call the service</li>
  <li>Save the token (into the class);</li>
  <li>Select a the application Store to see if the user asked another page (before the redirect into login. Because maybe he wanted to go in 'profile' page, but then I redirected him into Login, saving the wanted page 'profile'). In this case a redirect the user</li>
  <li>Do other actions (set the variable 'isAuthenticated', save the token, decode the token, in the Store).</li>
  </ul>
  
  <p>All works. This is the code of <strong>auth.effects.ts</strong>:</p>
  
  <pre><code>@Injectable()
  export class AuthEffects {
      constructor(private store: Store&lt;fromApp.AppState&gt;, private actions$: Actions, private router: Router, private authService: AuthService, private route: ActivatedRoute, private toastr: ToastrService) {
      }
      tokenObj: { token: string };
      @Effect()
      authLogin$ = this.actions$
          .ofType(AuthActions.DO_LOGIN)
          .pipe(map((action: AuthActions.DoLogin) =&gt; {
              return action.payload;
          })
              , switchMap((authData: { email: string, password: string }) =&gt; {
                  return from(this.authService.login(authData.email, authData.password));
              })
              , map(tokenObj =&gt; this.tokenObj = tokenObj) 
              , withLatestFrom(this.store.select(('core')))
              , take(1)
              , map(([action, storeState]) =&gt; {
                  if (storeState.redirectUrl) {
                      this.router.navigate([storeState.redirectUrl]);
                  } else {
                      this.router.navigate(['/']);
                  }
              })
              , mergeMap(() =&gt; {
                  return [
                      {
                          type: AuthActions.LOGIN 
                      },
                      {
                          type: AuthActions.SET_TOKEN,
                          payload: this.tokenObj.token
                      },
                      {
                          type: ProfileActions.DECODE_TOKEN,
                          payload: this.tokenObj.token
                      },
                      {
                          type: CoreActions.REMOVE_REDIRECT_URL
                      }
                  ];
              })
              , catchError((err, caught) =&gt; {
                  this.toastr.error(err.message);
                  // Quindi, alla fine, torniamo l'Observable di errore, affinché si possa ri-provare l'operazione
                  return caught;
              })
          );
  }
  </code></pre>
  
  <p>This is the function inside the <strong>login.component.ts</strong>:</p>
  
  <pre><code> onLogin(form: NgForm) {
      const email = form.value.email;
      const password = form.value.password;
      this.store.dispatch(new AuthActions.DoLogin({ email: email, password: password }));
    }
  </code></pre>
  
  <p>This is the function that triggers logout in <strong>header.component.ts</strong>:</p>
  
  <pre><code>onLogout() {
      this.store.dispatch(new AuthActions.Logout());
      this.store.dispatch(new ProfileActions.CancelLoggedUser());
      this.router.navigate(['/login']);
  }
  </code></pre>
  
  <p>The <strong><em>issue</em></strong> is: If I logout, I type again the email and the password, I press login and nothing happens. In particular, opening Ngrx DevTools I see that the DO_LOGIN is dispatched (with property values of the form) but the server is not called. Event if I put a breakpoint inside the effect, it doesn't trigger. Why?</p>
  
  <p>This is a screen of all the actions: Login ---> home ---> logout ---> do second time login:
  <a href="https://i.stack.imgur.com/9Rwox.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9Rwox.png" alt="enter image description here"></a></p>