Source code formatting fixes
Don't add navigation items if user is not logged in
Centralise URL generation into a URL generator class