Remove some unneeded session setting code in application.
Merge branch '4.1'