Make REST request work with HTTPS scheme

* Encoding authkey using base64 as Nginx is not working with an array of bytes