Merge pull request #574 from scrapinghub/bugfix-endlessloop

Detect https scheme when serving ssl
adding auth_token to ws request