There is no built-in option to track this. So, you will have to create a plugin for this (can’t help with that, but this should be possible). Login information is available in the Sessions page (start of the session), though not sure if this is saved into a database. If it does, then it probably possible to just make queries to the database and pull all the information you need. Otherwise you will have to create a code which will pull the information from the sessions manager. Log out information is stored in the database. So by checking the session start time and log out time of a particular user you can determine when he has logged in and for how long. Though you will have to poll that info quite often. Because if one log outs and login again, this infor will change. So you have to keep that in mind.
Also, sometimes Log out values don;t populate into database. So this can affect the results a bit.