getRepo returns null if no repoUser or repoName are set
Only set the password if it is not empty

This way if localstorage contains your credentials they will not get
reset when you refresh
Clean up load so error handlers fire when a file fails to load
Move error-handling code to one place