Fixed issue with encoding special/utf-8 characters ins username and password

Fixes issues with basic auth, when username and/or password contains special or utf-8 characters, like `ä`