 +      // Major Error handling
 +      if (data.RFIDError) { // RFIDhun cannot access RFID
 +        $('#RFIDStatus .btn').css("backgroundColor", "red");
-+        $('#RFIDStatusMessage').text("ERROR connecting to RFID, please press button or refresh Browser to try again!");
++        $('#RFIDStatusMessage').text("ERROR connecting to RFID, refresh Browser to try again!");
 +      } else if (data.SIPError) { // RFIDhub cannot access SIP Server
 +        $('#RFIDStatus .btn').css("backgroundColor", "red");
 +        $('#RFIDStatusMessage').text("ERROR connecting to SIP Server, please ask Zarathustra for help or refresh browser!");

+ * 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();
+  }
+});
+

+  state = $("body").attr("id");
+  // activate RFID Modal
+  $("#RFIDStatus").remove(); // In case this is a reconnect
+  $("div.gradient").append('<div id="RFIDStatus"><a class="btn btn-small" onclick="location.reload();">RFID</a><span id="RFIDStatusMessage"></span><button id="RFIDPreg" onclick="activateWrite(ws);">Preg brikker</button></div>');
+  ws.onopen = function() {
+    console.log("connected");
+
+    $('#RFIDStatus .btn').css("backgroundColor", "green");
+
+    ws.onmessage = function(resp) {
