I'm honestly not sure how any of this code is working correctly. We call setCredentials a bunch of times... isn't the last one the only one that ends up being taken?