Added password complecity validation to new user's creation form. Extracted away some code duplication.