Update button's type and add correct form submission handler

add button type to submit and onSubmit to addTask, so pressing enter will
trigger form submition