message security check

Adding a security check to avoid inter-room communication.