Hey V Cheng, thanks a lot for your comment! :)
1) Yes Heroku can "recognize" Flask. It "recognizes" our app.py file and serves it because of this line: web: gunicorn app:app. Other than Python (Flask), Heroku can support the following languages too: Ruby, Java, PHP, Python, Node, Go, Scala and Clojure.
2) Are you asking if it's possible to handle user authentication in Flask? I believe so, here's two links I found (I haven't tested them yet): https://hackersandslackers.com/flask-login-user-authentication/ and https://www.digitalocean.com/community/tutorials/how-to-add-authentication-to-your-app-with-flask-login