fixes expired cookie bug