updated mcsend script to support multiple connect/disconnect cycles.