fix of bug #368 Endless redirects or user doesn't exist with basic authentication