add function to auto register plugins
move inject_navigation function