You can write your own ISessionExtension `ch.ivyteam.ivy.security.ISessionExtension` which allows you to execute any code when users do Login/Logout.
As described here: https://answers.axonivy.com/questions/1359/detect-a-user-session-is-closing-because-of-timeout
So you can easily track the 'logged-in-time' with such an extension.