Thank you so much Wombat
Your code was life saving (or better saying CPU saving )

But there's a small problem!
When the time expires, the user isn't logged out unless mouse is moved!