Added a connection handeler at client