 +  ws.onclose = function() {
 +    console.log("disconnected");
 +    $('#RFIDStatus .btn').css("backgroundColor", "orange");
-+    if (windowInFocus) {
++    if (windowInFocus && wasOnceConnected) {
 +      connect();
 +    }
 +  }

+ * inserts table to #patronlists and adds highlighted items as they arrive from websocket
+ */
+var windowInFocus = true;
+$(document).ready(function() {
+  connect();
+
+  window.onfocus = function() {
+    windowInFocus = true;
+    connect();
+  }
+});
+

     <table id="checkedintable">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/rfidhub.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/rfidhub.inc
new file mode 100644
index 0000000..35d33bb
--- /dev/null
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/rfidhub.inc
@@ -0,0 +1,322 @@
+[% USE Koha %]
+<style type="text/css">
+/*
