in reply to logout button

Print a cookie with the same name but with an empty value. (Or even a value that says "logged out" or whate not). You can also try setting this expiration date to be some time in the past.