Move the :
<pre><?php var_dump($_SESSION); ?></pre>
so that it is after the <body> tag.
I just registered a user using:
on login I got error messages (Because the <pre><?php var_dump($_SESSION); ?></pre> code is in the head), but the login was successful, I was able to browse to the profile page.