Handle disconnects and better submit settings

Submit just the $scope.settings object, instead of passing in the values
in that manually. Also, tell the user when they lose their connection.