reorganize Method class
add userinfo support
fix headers dict builder
add base middleware api