Added auth for external api
Added tests for success and auth failure.