added logs for connections
updated with client code