Add correct session signaling and fix bug in client application.