ticket:3: added middleware + unsolved problem with testing meta['CSRF_COOKIE']