Portal extensions automatically show the logout option by default. However, you have an option to hide the logout button. To do this, you need to go to:
Extension Settings
Header & Profile section
Turn on Hide Logout Button toggle
This is commonly used when you are using login prefill.