Username & password must both be present, if only one is specified
Updated py2 version