changing goback from using only cookie to use referer