Fixed admin tab selection

Admin tab selection was relying on a specific url deployment with a set
number of path components. Now it simply looks at the last component
which is reliable