Register

Cleanup variables, add onpaste detection (with ugly hack), disable submit
button when there are still invalid fields, replace response codes with
actual responses.