first half of registration controller: form and validation