refactor to socket init and enter/exit lobby & games