modified registration
added validation of User