click event for chat window to open/close