improved login flow using flask session #9