Fix showing shares for already connected server.
Refactor some API code.
Add better connection handling for authentication.