@user_page.route('/login', methods=['GET', 'POST'])
def login():
    if 'id' in session:
        return redirect(url_for('general.index'))
    errors = list(request.args.getlist('error'))
    if request.method == 'POST':
        login_method = request.form.get('login')
        if login_method == 'musicbrainz':
            return musicbrainz_login()
        elif login_method == 'google':
            return google_login()
        elif login_method == 'openid':
            return openid_login()
    return render_template('login.html', errors=errors,
        return_url=request.values.get('return_url'))
dataset/ETHPy150Open lalinsky/acoustid-server/acoustid/web/views/user.py/login/original