Hi Will
Any chance you are using .htaccess for authentication? I was getting the same error you are but once I removed .htaccess, it work fine-- but now, what to do about authenticating users? I think the problem may have something to do with readfile() not being able to handle redirects.
Please let me know if .htaccess is your culprit and if you have found some workaround.
Good Luck
Adam