Move basic auth middleware