Handle binary username and passwords

Closes #176.
Closes #173.