Thread:Project:Support desk/Add Javascript for logged in users

I have a few KB worth JS which I add in the skin when the user is logged in.

I'd like to add that code to MediaWiki:Common.js. Can I use ResourceLoader so it is only applied to logged in users?