I have experience in using the Flask-wsgi-jinja framework for python, while using the mysql database and have made similar web pages to those you have presented. In my previous project, I created a web page for people to register, and log in, while checking for repeated users when registering and log out. The ids were kept in a database and I have also used the "blinker" extension to flash messages retrieved from my database, which are similar to your points 1 and 3. As for point 2 and 4, I will write a sql command to the database similar to "last log in".
I hope to be able to contribute to your project.
Thank you.