changed login to use Flask-Login