dynamically loading js and css files upon authentication