This change makes basic authentication fail after first unsuccessful attempt (instead of automatically retrying) and thus prevents unnecessary failed login attempts. This change also allows printing the contents of an HTTP 401 message to the user.