Added initial handshake code for socketIO