Move logic to build credentials into Auth class