Adding basic auth middleware.