Added authorize_url function and tests.