Just the first test worked, then the same.
If I check "stay logged in" I am not recognized. And not checking it, works after refreshing gallery home.
So yes, theres an issue in the cookies.
What I noticed changing that line in xenforo.php, is that I cant logout using the gallery logout button.
Its like that now, you can try.