password function does not work