[#70561992] Refactored client to make it possible to stub the authorize method for development