Rack middleware that handles basic auth and HMAC auth