Fix a breakage in get_credentials when unable to load a hosting service.

If Repository.get_credentials was unable to load an account's associated
HostingService, then it would fail trying to call a function on None. It
now checks that the service is loadable before trying.