connecting to server and channel