Re-write and cleanup of registration JS

Now have a generic validation input functionality in widgets.js
which accepts a set of general callbacks for on-input validation
and such