Fix password validation

Makes the validate password function actually work properly. Also makes the create user javascript in line with the function.
Not really no. It's just what we agreed on when this first went into place.