I'm trying to log into the o2 uk website from an application and I'm running into problems. The login on the site is done via a form, which is fine - I can put the username and password in as parameters to the Ajax request.

The problem is that the response to the form seems to be doing (possibly multiple) page submissions (the response is a page that loads another page, which might load another). I have a simple html page which can log in fine, but when I do it via Ajax.Request I'm not getting the same result. Specifically, I'm not getting cookies being set, which is required if I'm going to be able to carry on.

Has anyone had any experience with this type of thing? Or am I just barking up the wrong tree completely?