One more thing:
With keycloak.js it automatically does the redirect, AFTER the session did timeout keycloak.js immediately preforms the redirects - not on the first click