Setting up user registeration in JS