Edited register.js