moving cookie/log to listener