Added error handling in the REST download
Started API authentication