add server connection handler