Remember client side things do not normally affect server side things so unfortunately it is not as simple as that

. What you need to do is relocate to a "logout" page using javascript. You have two problems
1) Ensuring the unload of the page still retains the user command (e.g the user still goes to the page requested. A popup may be of use here but you would need to ensure popup blockers to not prevent activation.
2) What happens if users do not have javascript active.
These two reasons are the main reasons why people tend to time out as well as a link to logout.