Improving the way we check the remote repo's current state.

Merge in Authentication Updates before completing this.