Extended to allow Basic authentication