implemented the protocol for lobbies in the RESTful API