connection module  for making connection to server