create repository, intercepte request and set cookie