Added form validation checks for registration, and fixed registration bug for user lookup.