XHTML cleanup and use templating first part - logged in pages