fix refresh and sessions