switched to deploy mode
making disconnect button work and cleaning up event code a little