Realize session basic mechanism on client