Fixing layouts and headers for correct links

Fixing layout and header links to construct URLs using the correct app/engine. Also, changed the way header links for Pipelines, Environments, Agents, Preference, Logout was constructed.