Adjustments to fix the connection problems; new header for the
Authorization token; support for custom headers.