on_connect client handler & more tests