Added the password function, but needs to be debugged.