<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
           xmlns:metal="http://xml.zope.org/namespaces/metal"
           xmlns:i18n="http://xml.zope.org/namespaces/i18n">
  <tal:block tal:condition="here/portal_skins/updateSkinCookie | nothing"
             tal:define="dummy here/setupCurrentSkin;" />
  <tal:block tal:define="response request/RESPONSE;
             mtool here/portal_membership;
             isAnon mtool/isAnonymousUser|nothing;">
    <tal:block tal:condition="isAnon">
      <tal:block tal:define="dummy python: response.expireCookie('__ac', path='/');
                 url python: '%s/login_form?portal_status_message=%s' % (here.absolute_url(), here.Base_translateString('Login and/or password is incorrect.'));
                 url python: request.get('came_from') and  '%s&amp;came_from=%s' % (url, request['came_from']) or url;
                 dummy python: response.redirect(url);" />
    </tal:block>
    <tal:block tal:condition="not: isAnon">
      <tal:block tal:define="came_from python: request.get('came_from',here.absolute_url());
                 dummy python: response.redirect(came_from);" />
    </tal:block>
  </tal:block>
</tal:block>

