Move the :
<pre><?php var_dump($_SESSION); ?></pre>
so that it is after the <body> tag.
I just registered a user using:
Email: test@test.com
Pass: test
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.