Added register function.

Validate register form.