I added two test files to the ticket.. please use them to verify if your PHP/Firefox version works right..
Results added to ticket. It seems to work fine with the test files.
OK, since that's exactly the code that was used I reverted your changes.
I also updated the code a little bit so that now it uses only the Cookie class (and not the $_COOKIE variable) to handle the cookie.
It's everything in r38607.
Auto login is working for me now. :)