Adds missing globals
Fixes issue where users were not connected to each other
Handles errors by disconnecting
Bug fixes