added password validation to registration