in reply to using cookies with UserAgent

Have you checked the path and domain attributes for your cookie ? Have you tried setting them using Javascript, does the same thing happen. Also try downloading something like Cookie Pal from tucows to alert you when you get a cookie, so you know it is being set.