use requirejs and fix register page