upgrade to secure webscokets connection