Rewrite HTTP BASIC auth layer such that rack middleware is never invoked unless BASIC auth is enabled.