Integrated error pages, moved login form to TPL include, did some other stuff