fix networkname in special cases

This other single commit fix the join process in some special cases (when the priv key is given).