Untested fix for basic auth checks. Possibly it works. I'll test it this evening.