add return password to getPassword function