Implemented sessions storage and websocket logic