Meteor stale session auto logout not working when the user is inactive

I wanted a user to be logged out automatically when he is inactive for some time. And I used the stale session package for that. The problem is that it is not logging out the user after the given time it only works sometimes not everytime.

Below is the code I added in settings.json file

    "staleSessionInactivityTimeout": 10000,
    "staleSessionHeartbeatInterval": 1000,
    "staleSessionPurgeInterval": 4000,
    "staleSessionActivityEvents": "click keydown",
    "staleSessionForceLogout" : true,

Any help would be appreciated.