Add document ready to prevent mako runtime errors related to csrf tokens