Am I missing something, or is this not the issue? If you have a 302, you must obey it and retrieve the new location of the document. Unless of course the 302 is the message generated when a login fails?!
--
Ash OS durbatulk, ash OS gimbatul,
Ash OS thrakatulk, agh burzum-ishi krimpatul!
Uzg-Microsoft-ishi amal fauthut burguuli.