Extracting functionality for credentials / url building to separate funcs