Fix password validation

Makes the validate password function actually work properly. Also makes the create user javascript in line with the function.
If we agreed, then okay -- don't remember that, sorry.