http: fix endless loop with failed Basic auth