Not necessary to be in one layout.
At "menu" layout just send the players to the "game" layout with not involve multiplayer connection.
When a player navigated to the "game" layout connect him to the signaling server.
After that logged in him with an alias.
And finally on logged in join him to a room.
So everything has to deal with multiplayer object connection must done at "game" layout.
Thats all.