title: angular user-idle-service issue
body: <p>I am using the  user-idle-service (<a href="https://www.npmjs.com/package/angular-user-idle" rel="nofollow noreferrer">https://www.npmjs.com/package/angular-user-idle</a>) for angular.   I am using it for my angular 6 front end application, but am running into issues where my users are getting kicked out prematurely when they are active.  </p>
  
  <p>I fire the library as soon as a user logs in to the application.  It works most of the time, but sometimes users are getting prematurely kicked out when they are active in their browser. I am using this only for browser based usage.</p>
  
  <p>In my service class I fire the below, as well as configuration below that. Is there anything in the library I am using obviously wrong? :</p>
  
  <pre><code>constructor(private http: Http,
              private router: Router,
              private cookieService: CookieService,
              private userIdle: UserIdleService) {
      this.userIdle.setCustomActivityEvents(merge(
          fromEvent(window, 'mousemove'),
          fromEvent(window, 'resize'),
          fromEvent(document, 'keydown'),
          fromEvent(document, 'touchstart'),
          fromEvent(document, 'touchend'),
          fromEvent(window, 'scroll')
      ));
  }
  
  login(credentials: Credentials): Observable&lt;any&gt; {
      return this.http.post&lt;any&gt;(this.loginUrl, JSON.stringify(credentials), {
          headers: new HttpHeaders({'Content-Type': 'application/json'})
      })
          .pipe(map(userDetails =&gt; {
              this.setUserDetailsAndExtendExpirationInLocalStorage(userDetails);
              this.startUserIdle();
              this.goToHome();
          }));
  }
  
  startUserIdle() {
      this.userIdle.startWatching();
      this.subscriptions.push((this.userIdle.onTimerStart().subscribe()));
      this.subscriptions.push((this.userIdle.onTimeout().subscribe(() =&gt; {
          this.logout();
      })));
      this.subscriptions.push(this.userIdle.ping$.subscribe(() =&gt; {
          this.refreshToken();
      }));
  }
  
  refreshToken() {
      return this.http.get&lt;any&gt;(this.refreshUrl, {
          headers: new HttpHeaders({'Content-Type': 'application/json'})
      }).subscribe(() =&gt; {
          // do stuff
      }, () =&gt; {
          this.logout();
      });
  
  }
  
  logout() {
      this.goToLogin();
      this.removeUserDetails();
      this.removeSessionToken();
      this.userIdle.resetTimer();
      this.userIdle.stopTimer();
      this.userIdle.stopWatching();
      this.subscriptions.forEach(subscription =&gt; subscription.unsubscribe());
      this.setIsLoggedIn(false);
  }
  </code></pre>
  
  <p>Also in my app.module.ts file I configure it like below:</p>
  
  <pre><code>UserIdleModule.forRoot({idle: 900, timeout: 1, ping: 840})
  </code></pre>