That guide will only log you out after you make another request to the server. Meaning the page you are on currently could remain open forever.
It would be pretty easy to force a request to the server after a given time. In your template you can add a meta refresh:
<meta http-equiv="refresh" content="300">
Putting this in your header section of your html will reload the page after 5 minutes. The number is in seconds.
And then in the SessionIdleHandler
class you would just change the response to redirect where you wanted.
from:
$event->setResponse(new RedirectResponse($this->router->generate('fos_user_security_login')));
to:
$event->setResponse(new RedirectResponse($this->router->generate('my_bundle.my_route')));