Fix refresh and store contest view state in cookie