Refactor API
Provide an initial simple unit test
Remove client/server hack
Add goodbye acknowledgment
Handle SSL and principal-based endpoint determination