Update chat.py

preparing for multiple windows