Successful login with 'requireLogin' redirects to 404.shtml
I checked the http headers, and apparently my server was redirecting to a 404 page because the favicon.ico was missing. 

As soon as I uploaded one it all worked fine again.