Auth refactor

A number of commits to restructure and simplify the code that Bandshell uses to communicate with the server, including on error handling for network and server issues as discussed in #29.