if a user logs out, normally u will destroy the cookie as well.
it is just that when one kills the browser window, the browser will kill the session but not the cookie.
storing sensitive data in a cookie is dangerous. if u store username in a cookie and assume that user is logged in, if it is set, then anyone can spoof the cookie and gain access to some1 else's account 🙂
whether u use sessions or cookies, nothing is secure enough. just that u should try to be one step ahead of people trying to bypass security 😉