About Monitoring Users login-logout time

Hello , i hope all is well , i need an orientation or help about monitoring users login - logout time/date , i am near finishing my web app and all what is losing my time is this part . please can i get help over this problem

what you could do is just create a value in the database for when the user logged in, then one for when he/she logged out and compare the two.
preferably you also add a unique identifier if users are allowed to (or able to) login on multiple devices/browsers simultaneously (so you won’t count logging out on device A as logging out on device B)

You can enabled monitoring / user session tracking. I think login and logout information is stored there.

Set the following to true to track user clicks in memory for the duration of a user’s session. Setting this to true allows you to view all live
sessions in the Admin portlet.


Set the following to true to track user clicks in the database after a user’s session is invalidated. Setting this to true allows you to generate the usage reports from the database. Use this cautiously because this will store a lot of usage data.


This is not a smart idea to do because,w here would you need to change this? and you are now tracking your users all over your site, which can cause some privacy issues.