Implemented a graceful disconnect and did some UI clean up

@davidfowl @mikary @abnanda1 
Still a typo in the element ID `seting` --> `setting`. Presumably need to update the HTML/JS code as well.