Solely use datetime objects for timing

Also added some comments, and a different thing to write to logs when
commands are run. Oh and I changed a p to a u since it seems to contain a user object so u seemed to make more sense.
This bit will likely fail at this point in time if any user in userlogininfo does not have login and logout data that can be processed by format.