          content = self._get_content(self.resource, output)
          form_instance = self._get_form_instance(self.resource)
  
          template = loader.get_template(self.template)
          context = RequestContext(self.resource.request, {
              'content': content,
              'resource': self.resource,
              'request': self.resource.request,
              'response': self.resource.response,
 
</s> remove             'form': form_instance
 </s> add             'form': form_instance,
            'login_url': login_url,
            'logout_url': logout_url, </s> remove # TODO: Display user login in top panel: http://stackoverflow.com/questions/806835/django-redirect-to-previous-page-after-login
 </s> add  </s> remove from itertools import chain
 </s> add 
        if url_resolves(settings.LOGIN_URL) and url_resolves(settings.LOGOUT_URL):
            login_url = "%s?next=%s" % (settings.LOGIN_URL, self.resource.request.path)
            logout_url = "%s?next=%s" % (settings.LOGOUT_URL, self.resource.request.path)
        else:
            login_url = None
            logout_url = None

          content = self._get_content(self.resource, output)
          form_instance = self._get_form_instance(self.resource)
  
        if url_resolves(settings.LOGIN_URL) and url_resolves(settings.LOGOUT_URL):
            login_url = "%s?next=%s" % (settings.LOGIN_URL, self.resource.request.path)
            logout_url = "%s?next=%s" % (settings.LOGOUT_URL, self.resource.request.path)
        else:
            login_url = None
            logout_url = None

          template = loader.get_template(self.template)
          context = RequestContext(self.resource.request, {
              'content': content,
              'resource': self.resource,
              'request': self.resource.request,
              'response': self.resource.response,
keep keep add keep keep keep keep keep keep
 Login/Logout and FlyWheel API link in HTML emitter 
flywheel/emitters.py