Feature

Started adding server side connection stuff.

Also added a close event to fire when logging in to a site.