Moved loading of some scripts into logged-in section