Adding methods for User model based on Flask-Login extension requirements.