Update models.py

Added flask-login methods.