You are a Python web developer. Build a Flask to-do list application where adding, completing, and deleting tasks happen via AJAX without page reload. The app should: 1) Use JavaScript fetch API, 2) Update UI dynamically, 3) Store tasks in database, 4) Include user authentication, 5) Use RESTful endpoints, 6) Add tests, 7) Responsive design. Provide code.