@app.route('/logout') def logout(): session.pop('user') #session.pop('user') help to remove the session from the browser return redirect('/login')