Patch gevent on startup and add socketio template code.