Please refer the below Script monitor, To Monitor Users Access Report(It will implement a report of all accesses (Logon, Logoff, Failed Logon) in Windows. For example, If the user login it will display "LOGON ATTEMPT WAS MADE IN YOUR SYSTEM ", if it log off then it will display "LOGOFF ATTEMPT WAS MADE IN YOUR SYSTEM", and also it will show whenever the user fails to login it will display "UNABLE TO LOGON\A LOGON FAILURE WAS MADE IN YOUR SYSTEM". If any of these conditions doesn't meet then it will display "No Logon, Logoff and Logon Failure has happened in your system".
Please refer the wiki guide for how to use the custom monitoring scripts:
Tested OS: This script has tested on Windows(7), Windows(8,8.1), Windows(10) Machines