HTML5 canvas based smooth signature drawing