def logout(): # remove the username from the session if it's there session.clear() return redirect(url_for('index'))