More tests and a fix for the hash_password function