Correct session close logic, add method on serverMessageHander.