Solved: cookies are blocked when into an iframe from another domain. I used localStorage as work around.