updated to use Flask-Login