diff --git a/README.md b/README.md
index 4959665..45111bc 100644
--- a/README.md
+++ b/README.md
@@ -85,15 +85,17 @@ service. pyactiveresource has to be configured with a fully authorized
 URL of a particular store first. To obtain that URL you can follow
 these steps:
 
-1.  First create a new application in either the partners admin or
-    your store admin. For a private App you'll need the API_KEY and
-    the PASSWORD otherwise you'll need the API_KEY and SHARED_SECRET.
+1.  First create a new application in either the partners admin or your store
+    admin. You will need an API_VERSION equal to a valid version string of a
+    [Shopify API Version](https://help.shopify.com/en/api/versioning). For a
+    private App you'll need the API_KEY and the PASSWORD otherwise you'll need
+    the API_KEY and SHARED_SECRET.
 
 2.  For a private App you just need to set the base site url as
     follows:
 
      ```python
-     shop_url = "https://%s:%s@SHOP_NAME.myshopify.com/admin" % (API_KEY, PASSWORD)
+     shop_url = "https://%s:%s@SHOP_NAME.myshopify.com/admin/api/%s" % (API_KEY, PASSWORD, API_VERSION)
      shopify.ShopifyResource.set_site(shop_url)
      ```
 
diff --git a/shopify/base.py b/shopify/base.py
index c902152..6cfee0e 100644
--- a/shopify/base.py
+++ b/shopify/base.py
@@ -77,6 +77,11 @@ class ShopifyResourceMeta(ResourceMeta):
         ShopifyResource._site = cls._threadlocal.site = value
         if value is not None:
             parts = urllib.parse.urlparse(value)
+            host = parts.hostname
+            if parts.port:
+                host += ":" + str(parts.port)
+            new_site = urllib.parse.urlunparse((parts.scheme, host, parts.path, '', '', ''))
+            ShopifyResource._site = cls._threadlocal.site = new_site
             if parts.username:
                 cls.user = urllib.parse.unquote(parts.username)
             if parts.password:

diff --git a/test/base_test.py b/test/base_test.py
index 9e78bdb..8847857 100644
--- a/test/base_test.py
+++ b/test/base_test.py
@@ -98,13 +98,18 @@ class BaseTest(TestCase):
         t2.start()
         t2.join()
 
-    def test_setting_site_without_token(self):
+    def test_setting_with_user_and_pass_strips_them(self):
+        shopify.ShopifyResource.clear_session()
         self.fake(
             'shop',
-            url='https://user:pass@this-is-my-test-show.myshopify.com/admin/api/unstable/shop.json',
+            url='https://this-is-my-test-show.myshopify.com/admin/shop.json',
             method='GET',
             body=self.load_fixture('shop'),
             headers={'Authorization': u'Basic dXNlcjpwYXNz'}
         )
-        shopify.ShopifyResource.set_site('https://user:pass@this-is-my-test-show.myshopify.com/admin/api/unstable')
+        API_KEY = 'user'
+        PASSWORD = 'pass'
+        shop_url = "https://%s:%s@this-is-my-test-show.myshopify.com/admin" % (API_KEY, PASSWORD)
+        shopify.ShopifyResource.set_site(shop_url)
         res = shopify.Shop.current()
+        self.assertEqual('Apple Computers', res.name)
diff --git a/test/session_test.py b/test/session_test.py
index d76c0f9..bf41591 100644
--- a/test/session_test.py
+++ b/test/session_test.py
@@ -84,7 +84,7 @@ class SessionTest(TestCase):
             assigned_site = shopify.ShopifyResource.site
 
         self.assertEqual('https://testshop.myshopify.com/admin/api/unstable', assigned_site)
-        self.assertEqual('https://None/admin/api/unstable', shopify.ShopifyResource.site)
+        self.assertEqual('https://none/admin/api/unstable', shopify.ShopifyResource.site)
 
     def test_create_permission_url_returns_correct_url_with_single_scope_and_redirect_uri(self):
         shopify.Session.setup(api_key="My_test_key", secret="My test secret")

Shopify API url not working
Hi,

Currently, I'm just playing around, with this library. I created a development store and a private app.
When I'm trying to create a product I got the following error:

Python 3.7.2
ShopifyAPI==5.0.1

Traceback (most recent call last):
  File "C:\Users\danish\AppData\Local\Programs\Python\Python37\lib\http\client.py", line 877, in _get_hostport
    port = int(host[i+1:])
ValueError: invalid literal for int() with base 10: '16xxxxxxx9exxxx5xxxxxxxxxxxxc5@my-chandola.myshopify.com'

Any help will be appreciated.

Thanks 
test/session_test.py::SessionTest::test_temp_works_without_currently_active_session test/base_test.py::BaseTest::test_setting_with_user_and_pass_strips_them
test/session_test.py::SessionTest::test_hmac_calculation test/session_test.py::SessionTest::test_not_be_valid_without_token test/session_test.py::SessionTest::test_be_valid_with_any_token_and_any_url test/session_test.py::SessionTest::test_create_permission_url_returns_correct_url_with_single_scope_and_redirect_uri test/session_test.py::SessionTest::test_create_permission_url_returns_correct_url_with_no_scope_and_redirect_uri test/session_test.py::SessionTest::test_return_site_for_session test/session_test.py::SessionTest::test_create_permission_url_returns_correct_url_with_no_scope_and_redirect_uri_and_state test/session_test.py::SessionTest::test_raise_error_if_params_passed_but_signature_omitted test/session_test.py::SessionTest::test_setup_api_key_and_secret_for_all_sessions test/session_test.py::SessionTest::test_not_be_valid_without_a_url test/session_test.py::SessionTest::test_parameter_validation_handles_missing_params test/session_test.py::SessionTest::test_append_the_myshopify_domain_if_not_given test/session_test.py::SessionTest::test_temp_reset_shopify_ShopifyResource_site_to_original_value test/session_test.py::SessionTest::test_hmac_calculation_with_ampersand_and_equal_sign_characters test/session_test.py::SessionTest::test_hmac_validation test/session_test.py::SessionTest::test_raise_error_if_hmac_does_not_match_expected test/session_test.py::SessionTest::test_use_https_protocol_by_default_for_all_sessions test/session_test.py::SessionTest::test_create_permission_url_returns_correct_url_with_single_scope_and_redirect_uri_and_state test/session_test.py::SessionTest::test_create_permission_url_returns_correct_url_with_dual_scope_and_redirect_uri test/session_test.py::SessionTest::test_myshopify_domain_supports_non_standard_ports test/session_test.py::SessionTest::test_raise_error_if_hmac_is_invalid test/session_test.py::SessionTest::test_return_token_if_hmac_is_valid test/session_test.py::SessionTest::test_raise_exception_if_code_invalid_in_request_token test/session_test.py::SessionTest::test_raise_error_if_timestamp_is_too_old test/session_test.py::SessionTest::test_param_validation_of_param_values_with_lists test/session_test.py::SessionTest::test_ignore_everything_but_the_subdomain_in_the_shop test/base_test.py::BaseTest::test_activate_session_should_set_site_and_headers_for_given_session test/base_test.py::BaseTest::test_headers_is_thread_safe test/base_test.py::BaseTest::test_delete_should_send_custom_headers_with_request test/base_test.py::BaseTest::test_activate_session_with_one_session_then_clearing_and_activating_with_another_session_shoul_request_to_correct_shop test/base_test.py::BaseTest::test_headers_includes_user_agent test/base_test.py::BaseTest::test_activate_session_should_set_site_given_version test/base_test.py::BaseTest::test_clear_session_should_clear_site_and_headers_from_Base