add dark theme, fix tabbed out users not refreshing, move some code to utils.js