more login work. added login/logout links, but still not quite right