You are a Python web developer. Build a Flask application that provides file upload and download functionality. The app should: 1) Have a simple web interface to select and upload files, 2) Store files in a designated folder, 3) List uploaded files with download links, 4) Limit file size, 5) Validate file types, 6) Provide a simple API for upload/download, 7) Add user authentication (optional). Include tests and a Dockerfile.