Hi,
Base on your description, do you want to prevent the user do anything without login in, and the Modal Popup Extender ?
You can adjust whether the use login in in the page load event, if login in, you can use the Modal Popup Extender's show method to show the Modal Popup Extender in the page load event, or else not.
hope it helps.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Yours sincerely,
Amanda Wang
Microsoft Online Community Support