So I think what was actually happening is I was including ssi.php from Simple Machines Forums and something in there was messing around with the sessions. So I had to do that form on it's own page to work around this. Just in case anyone else comes across something like this.
Thanks.