title: Flask-Login check if user is authenticated without decorator
body: <p>From the Flask-Login docs, it's described how a user of the system can require an authenticated User-model to access a method utilising the decorator syntax:</p>
  <pre><code>from flask_login import login_required    
  
  @app.route(&quot;/settings&quot;)
  @login_required
  def settings():
      pass
  </code></pre>
  <p>Now that's all well and good, but I want to be able to examine if the user is authenticated in a method, something like this:</p>
  <pre><code>@app.route('/main/', methods=['GET', 'POST'])
  main_route():
      if request.method == 'GET':
           if user_is_authenticated():    #Do the authentication here
               #load authenticated /main/ html template etc.
               pass
           else:
               #load unauthenticated /main/ html template etc.
               pass
      ...
  </code></pre>
  <p>The reason for this, is because it factorises the GET and POST requests rather than duplicating routes for authenticated users and unauthenticated users.<br />
  How can I do this? Is it possible?</p>