Socket IO connection logic added.