implement checksession