You could stop the other pages from loading if the user is not authorized;
# import libraries here
if not st.session_state.authentication_status:
st.info('Please Login from the Home page and try again.')
st.stop()
# rest of the operations
As proposed in this topic; How to manage a multipage app with user authentication - Using Streamlit - Streamlit
Other options;
I found this library which supposedly has multipage-authentification (never used it);
bharath5673/streamlit-multipage-authentication (github.com)
I personally use multi_pages;
New package st-pages: change page names and icons in sidebar without changing filenames - Custom Components - Streamlit
As I feel its more friendly towards the sidebar menu aswell with section, indentation etc.