Hi,
you should create a custom app or a remote addon to achieve this, but it can be quite hard to detect the inactivity.
You could listen for the event $stateChangeStart to detect if the user is navigating through the app and logout him if he doesn't in X minutes. However, the user could be reading a long text in a page, or answering a quiz, or watching a video... So you should think in all the possible cases and try to use events to detect if the user is doing something (like clicks in the app).
Kind regards,
Dani