Built in and FREE Group Policy auditing. Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Configuration > Logon/Logoff
Configure an event forwarder: Computer Configuration > Policies > Administrative Templates > Windows Components > Event Forwarding
Audit logon/logoff/workstation lock and unlocks and more options.
For logoff check event 4634, workstation lock event 4800, unlock 4801. Get help from this article to audit successful Logon/Logoff and Failed Logons.