We can achieve this by doing make changes to thing. Lookup for the latest sign in time and update the logout time against the same.
But question is what if the user do not log out, instead closes the window?
We have to set auto log off for 10 or 15 min.