better debugging for password authentication