generate random token, store it in a cookie