impossible to say why it is invalid without more information.
try adding this code to the failure page after the body tag:
<pre><?php var_dump($_SESSION); ></pre>
this may give us some more details on the nature of the issue.
NOTE< The session var dump may contain sensitive information which should be removed before posting here.