added underscore to package.json and removed unused if statement in ensureLoggedIn