title: Redirects in Flask/Werkzeug are not changing the URL
body: <p>I am very knew to python web development, so please bear with me.</p>
  
  <p>I am trying setup a very basic log-in using Flask and the below code: </p>
  
  <pre><code>@app.route('/')
  def index():
          if verifyLoggedIn():
                  someData = gatherSomeData()
                  return render_template('main.html', data=someData)
          else:
                  return redirect(url_for('login'))
  
  @app.route('/login/', methods=['GET', 'POST'])
  def login():
      if request.method == 'POST':
          if request.form['usr'] == user and request.form['pwd'] == password:
                  session['user'] = request.form['usr']
                  session['passwd'] = request.form['pwd']
                  return redirect(url_for('index'))
          else:
                  return render_template('out.html',name=request.form['usr'])
      else:
          return render_template('login.html')
  </code></pre>
  
  <p>When I access the page by going to 'localhost:5000/', I correctly get forwarded to 
  'localhost:5000/login/'. After I log-in, however, the page loads 'main.html' but the url bar still shows 'localhost:5000/login/'. The problem with this, is that if I hit refresh button to get the new value of 'someData' I end up back at the log-in screen. I find that this is the case after any post action. Am I missing something very fundamental here?</p>