Re-build chat application using Flask.