1. Allow to work behind port forwarding
   - use request's port instead of hardcoded
2. Support deployemnt separately from SO:
   - add api_server as app parameter
   - remove unnecesary using on client side

Signed-off-by: Gennadiy Dubina <gennadiy.dubina@dataart.com>
diff --git a/skyquake/framework/utils/utils.js b/skyquake/framework/utils/utils.js
index 8a54ff3..e8e9ad1 100644
--- a/skyquake/framework/utils/utils.js
+++ b/skyquake/framework/utils/utils.js
@@ -189,7 +189,7 @@
     window.sessionStorage.setItem("auth", AuthBase64);
     self.detectInactivity();
     $.ajax({
-            url: '//' + window.location.hostname + ':' + NODE_PORT + '/check-auth?api_server=' + API_SERVER,
+            url: '//' + window.location.hostname + ':' + window.location.port + '/check-auth?api_server=' + API_SERVER,
             type: 'GET',
             beforeSend: Utils.addAuthorizationStub,
             success: function(data) {