Paint application using Javascript and HTML5/canvas in Flask with MongoDB