Fixed a bug with error handling, supported use of cookies from requests, and made local file uploads work