Added logout link and room control logic