fixed the broken todo page

it's broken because it didn't handle cookie correctly.