fixing templates, login/logout stuff, etc