Implemented the cookie for both the Theme and todoList.
fixed the uncaught error in the main controller page.