polished the templates and added a logout option