Add connect client function