Update main.js

loggedInUser global variable added