enqueue user dynamic js after localization. 

replaces the dynamic script generation that had used an argument to index.php.  

should help performance as the script can be more easily cached and could also be served from a cdn.

Addresses #565