fixed the loading secrets to be inside the front controller instead of a hook