Page navigation did not work rightly in stramlit app

I would like to bring to your attention an issue with my code regarding page navigation, which is not functioning correctly. I aim to display different pages based on user roles; for instance, if the user is an admin or super user, they should have access to all pages, while data entry users should have limited access. However, the system currently only displays the login page instead of the appropriate content. I would appreciate your guidance on how to implement this functionality effectively. Please review my code and make any necessary modifications to achieve the desired outcome. Thank you in advance for your assistance.

import streamlit as st
from streamlit_option_menu import option_menu
from openpyxl import Workbook
import pandas as pd
st.set_page_config(page_title=“Page Title”, layout=“wide”)

global xmfa
xmfa = 0

Sample_video = st.Page( page = “pages/video.py”, title = “Sample VIdeo” )
page_one = st.Page( page = “pages/page1.py”, title = “Drag and Drop Pivot Table with selected data export to Excel” )
page_two = st.Page( page = “pages/treecahrtofaccount.py”, title = “Tree Chart of Account” )
page_three = st.Page( page = “pages/page3.py”, title = “Organization, finding and exportation of data” )
page_four = st.Page( page = “pages/page44.py”, title = “Data filtration and exportation” )
page_five = st.Page( page = “pages/stgraph.py”, title = “Ploting the Graph” )
page_six = st.Page( page = “pages/dataent.py”, title = “Data Entry with Excel Data Copy and Past” )
page_seven = st.Page( page = “pages/multiselection.py”, title = “Master Detail selection Multi Record” )
page_eight = st.Page( page = “pages/getsingerow2.py”, title = “Master Detail selection Single Record” )
page_nine = st.Page( page = “pages/masterdetaildataentry.py”, title = “Master Detail Data Entry” )
page_ten = st.Page( page = “pages/masterdetailwithnestedrecord.py”, title = “Tree Master detail Record” )
page_ten11 = st.Page( page = “pages/deshbordgraph.py”, title = "Deshbord detial with graph " )
page_ten12 = st.Page( page = “pages/filterrowandcol.py”, title = "Get data filter by Column and Row " )
page_ten13 = st.Page( page = “pages/graphbydf.py”, title = "Grahp as per Data " )
page_ten14 = st.Page( page = “pages/multirowandmulticolselection.py”, title = "Multi row and column selection for new DF " )
page_ten15 = st.Page( page = “pages/multitypegraph.py”, title = "Multi Type Graph with DF " )
page_ten16 = st.Page( page = “pages/addupdatedeteleinone.py”, title = "Record Select + ADD + Uudate+ Delete save history " )

if xmfa == 0:
pages = st.navigation([Sample_video,page_one])
elif xmfa == 1:
pages = st.navigation([Sample_video,page_two])
elif xmfa == 2:
pages = st.navigation([Sample_video,page_one,page_ten14 ])
elif xmfa == 3:
pages = st.navigation([Sample_video,page_one,page_ten11 ])
pages.run()

st.markdown(
“”"

MainMenu {visibility: hidden;}
footer {visibility: hidden;}
[data-testid=“stSidebar”] { visibility: hidden; }

“”",
unsafe_allow_html=True
)

url12 = “custlog.xlsx - Google Sheets
file_id122 = url12.split(“/”)[-2]
path1122 = “https://drive.google.com/uc?export=download&id=” + file_id122
st.session_state.df922 = pd.read_excel(path1122)
df= st.session_state.df922
df2 = pd.DataFrame(df)

uid = st.text_input(“Movie title”, “Life of Brian”)
paw = st.text_input(“Enter a password”, type=“password”)
if st.button(‘Check availability’):
cond1 = df2.uid == uid
cond2 = df2.paw == paw
st.write(uid , paw)
df12 = df2.where(cond1 & cond2)
#df12 = df2.where(uid & paw)
df12 = df12[~df12.isnull().any(axis=1)]
num_rows = len(df12)
if num_rows>0 :
st.write(df12)
mfashow = df12[“rith”].values[0]
xmfa = 1

      st.markdown(
        """
        <style>
        [data-testid="stSidebar"] {
            visibility: visible;
        }
        </style>
        """,
        unsafe_allow_html=True
        )
      
    else:
        st.write("testing")

Sample_video = st.Page( page = “pages/video.py”, title = “Sample VIdeo” )
page_one = st.Page( page = “pages/page1.py”, title = “Drag and Drop Pivot Table with selected data export to Excel” )
page_two = st.Page( page = “pages/treecahrtofaccount.py”, title = “Tree Chart of Account” )
page_three = st.Page( page = “pages/page3.py”, title = “Organization, finding and exportation of data” )
page_four = st.Page( page = “pages/page44.py”, title = “Data filtration and exportation” )
page_five = st.Page( page = “pages/stgraph.py”, title = “Ploting the Graph” )
page_six = st.Page( page = “pages/dataent.py”, title = “Data Entry with Excel Data Copy and Past” )
page_seven = st.Page( page = “pages/multiselection.py”, title = “Master Detail selection Multi Record” )
page_eight = st.Page( page = “pages/getsingerow2.py”, title = “Master Detail selection Single Record” )
page_nine = st.Page( page = “pages/masterdetaildataentry.py”, title = “Master Detail Data Entry” )
page_ten = st.Page( page = “pages/masterdetailwithnestedrecord.py”, title = “Tree Master detail Record” )
page_ten11 = st.Page( page = “pages/deshbordgraph.py”, title = "Deshbord detial with graph " )
page_ten12 = st.Page( page = “pages/filterrowandcol.py”, title = "Get data filter by Column and Row " )
page_ten13 = st.Page( page = “pages/graphbydf.py”, title = "Grahp as per Data " )
page_ten14 = st.Page( page = “pages/multirowandmulticolselection.py”, title = "Multi row and column selection for new DF " )
page_ten15 = st.Page( page = “pages/multitypegraph.py”, title = "Multi Type Graph with DF " )
page_ten16 = st.Page( page = “pages/addupdatedeteleinone.py”, title = "Record Select + ADD + Uudate+ Delete save history " )

#with st.expander(“Login”):