detecting Mouse and Keyboard Events and setting UserIsActive accordingly