Latest version
Applied logic for session and authentication with secure/unsecure comms protocol
replaced newConnection event with newConnectionAccepted event