Can you be more specific as to where to place this code.
I am running 1.5 (after dowgrading from 1.6). fairly fresh install with a custom theme. When a user is logged in, site seems fine, but if not logged in and placing thing in cart, once going to check-out or trying to login, the cart is then emptied. I thought it was something with cookies or the use/exclusion of the www in the domain, but I've tried this for the past 10 hours and I'm still stumped.
Site is at duinokit.com