handle posting of todos to backend