switch to secure endpoint