Adjust javascript loading in base template