Use ws for http, wss for https

Looks like we're actually going to need this
weve been using window everywhere else i think it;s ok for now