fix the utf-8 password bug for good (aka bug 177117) and add unit tests this time.
split auth tests into their own file, and clean up the remaining transport tests a bit (use existing refactoring).