Basic session handling, handshake