wrote lockChat() and unlockChat() method to block the user from typing until second user has entered the room