def METHOD_NAME():
    player_data = request.form['player_data']
    players = db.table('Players')
    player = Query()
    res = players.search(player.passphrase == player_data)
    new_player = len(res) == 0
    if new_player:
        # add monitor for new subaddress
        subaddress = get_next_subaddress()
    else:
        assert len(res) == 1 # FIXME: collisions
        subaddress = res[0]['subaddress']
    monitor = get_or_add_monitor(subaddress)
    request_code = create_request_code(monitor, subaddress).b58_code
    balance = mobilecoind.get_balance(monitor, subaddress).balance
    if new_player:
        players.insert({
            'passphrase': player_data,
            'subaddress': subaddress,
            'code': request_code
        })
    else:
        # update the request code
        players.update({'code': request_code}, player.passphrase == player_data)
    leaderboard = get_leaderboard()
    response = {
        "code": request_code,
        "balance": balance / MOB,
        "leaderboard": leaderboard,
        "goal": WINNING_AMOUNT / MOB,
        "new": new_player,
    }
    return json.dumps(response)