Fix session connect_* api message handling.