add required functions for flask_login as well as fix User model
fix user login and begin complete transfer of login to flask_login