added js to register