use CMD_DETACH instead of CMD_CANCEL when bringing down the connection

That makes libopenconnect to call the disconnect part of the script.
when checking form elements use case insensitive comparison
return zero on completion
when disconnected, update the progress bar to show so
added more debugging info
when closing the application close the logdialog