Changed add server to use rest api.
Handle error when it already exist.