The log() method does not return a response if you're accessing it via GET.
Your question is a bit uninformative where the error is happening, but this is what I can deduce.
Edit: Looking into the video, it is indeed the log method that is causing you trouble.
You've accidentally indented too deep.
@app.route('/log', methods=['GET','POST'])
def log():
error = None
if request.method == "POST":
if request.form['username'] != 'admin' or request.form['password'] != 'admin':
error = "Invalid credentials"
else:
session['logged_in'] = True
return redirect (url_for('hello'))
return render_template('log.html', error=error)