Latest version
Applied logic for session and authentication with secure/unsecure comms protocol
commented out logic in serverDisconnected as invalid and added appropriate TODOs