title: Record Login, Logout, System Lock/Unlock event in C#
body: <p>I am planning a develop an application, which starts up with windows (a service perhaps) and silently records User's Login, Logout and System Lock/Unlock events.. </p>
  
  <p>It would be awesome if someone can give a me a tip to record their total idle time (the time where no system activity was performed by user)</p>
  
  <p>I am looking for a pre-developed library or something which can help me smoothly complete the project.</p>