added validation for password and username