def login(): if request.method == 'GET': return render_template('login.html') email = request.form['email'] password = request.form['password'] user = User.get(uid=email) if user != None and user.check_authenticated(password=password): login_user(user) return redirect('/') return 'Bad login'
def user_loader(email): print('in user_loader') return User.get(uid=email)