Fixed not setting cookie.