updated basehandler to create universal login/out links in base.html