Refactored ChatSocketController
Refactored ChatSocketController