Fix #126 Basic authentication causes NullPointerException