Fixed issues with basic auth and NoneType errors