Ring middleware to enforce basic authentication.