Adds logic to run ajax only if user is logged in

Adds logic to run ajax only if user is logged in

diff --git a/desktop/header.html b/desktop/header.html
index af53059..daef817 100644
--- a/desktop/header.html
+++ b/desktop/header.html
@@ -3,6 +3,9 @@
 <script type="text/discourse-plugin" version="0.8">
   const ajax = require('discourse/lib/ajax').ajax;
 
+  // script wont run unless user is logged in
+  if (api.getCurrentUser() === null) return false;
+
   let currentUser = Discourse.User.currentProp('username');
 
   api.registerConnectorClass('discovery-below', 'sidebar', {

GitHub sha: 0b2c086a63dc81249cbd0a927911c780d3125577