I think you're just stuck with it. The browser doesn't know it should ask for (or provide) credentials until the server responds to its initial query with a 401, specifying the realm that requires authentication. Then the browser asks the user for credentials for that realm, and resends the request to the server with the credentials attached.
So in short, it's quite normal to get a lot of 401 errors if you've password-protected areas of your site. You could modify your error handler to detect whether people actually entered the wrong credentials (rather than no credentials), if you want to log actual failed logins.
HTTP authentication (basic or digest) is a bit of a hack really.