refactory, use hashes where possible
improve security (split add and update node),implement connect to node, use sha256 for register