Implemented a graceful disconnect and did some UI clean up

@davidfowl @mikary @abnanda1 
The parameter was removed from this method to accommodate the possibility of multiple agents being in different states. I.e. new agent connects during the test, or one of the agents finishes disconnecting before the others. As written this is likely to result in the UI rapidly flipping back and forth between states.