ERROR Unauthenticated 
{"id":1512098314554,"jsonrpc":"2.0","error":{"code":-1,"message":"Unauthenticated"}}

This error is recurring, I reported this same problem to x25 code, the solution he used was this:

https://github.com/x25/coinhive-stratum-mining-proxy/commit/0a31eab2e421dc168f088fc09aa80ae7401f41c2
