work on session binding.
Merge branch '4.0'