diff --git a/public/js/app.js b/public/js/app.js
index 2519f4493755db6957b5b25f2c755daf6a1d6862..27fd1ce63189a53f6eb9205935e1c819c755c7ed 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -2737,6 +2737,14 @@ angular.module('cerebro').factory('DataService', ['$rootScope', '$timeout',
       RefreshService.refresh();
     };
 
+    this.disconnect = function() {
+      host = undefined;
+      username = undefined;
+      password = undefined;
+      onGoingRequests = {};
+      $location.path('/connect');
+    };
+
     if ($location.search().host) {
       this.setHost($location.search().host);
     }
diff --git a/src/app/shared/services/data.js b/src/app/shared/services/data.js
index e8d40c64a38242c90da46ca4cf7dd15055221c28..10c467c6af7013a67ce4ce2453ce898ed3e3bc49 100644
--- a/src/app/shared/services/data.js
+++ b/src/app/shared/services/data.js
@@ -23,6 +23,14 @@ angular.module('cerebro').factory('DataService', ['$rootScope', '$timeout',
       RefreshService.refresh();
     };
 
+    this.disconnect = function() {
+      host = undefined;
+      username = undefined;
+      password = undefined;
+      onGoingRequests = {};
+      $location.path('/connect');
+    };
+
     if ($location.search().host) {
       this.setHost($location.search().host);
     }