added some validation on register form