fastcgi auth fix

Hi katzgrau,
First of all thank you for this *sparks*. You saved my day today.

Our server runs with fastcgi enabled and i had some issues while deploying.
I have fixed the *sparks* and i decided to share this with you.

I hope it will help.

Best regards