Merge pull request #38 from hintjens/master

Problem: was not re-registering clients correctly
Merge pull request #43 from hintjens/master

Fixed issue #42 and other related items.
Problem: did not correctly handle invalid server endpoints

Solution: handle with exception in client dialog.