Hello all. Can someone please give some sample code on how to timeout a user when he is inactive or when he closes the browser window? For example when a user logs in a value is set to true and stored in a database. when the user becomes inactive for some x minutes or when he closes the browser window the value will be set to false and he is logged out automatically. Please help!