I've been having a heck of a time with cookies.
I have an Android application built with Android-Couchbase-Callback. It's a CouchApp, basically a JavaScript + CouchDB app running as an Android app. On laptops and dekstops it works fantastically.
My problems are 1) either cookies will be set and then unchangeable, or 2) they won't be set at all. They're simply not behaving like they should. Right now on my app, I can login a couple of times, which means cookies get set, and then unset, but second time I log out, like clockwork, it will fail. The logout functions appear to resetting everything properly, but at that point I'm unable to remove the cookie, even though I can add new cookies.
I had this cookie-instability problem before and I got around it by authenticating with a GET variable "AuthSession" as opposed to the cookie "AuthSession", which seemed to work before, when the problem was the cookie was saving, but wasn't getting sent to the server.
I'm using jQuery.couch, jQuery.cookie, and Backbone.js.