add SESSID generator and parse cookie function