To recover from such problems, every site has an emergency page which provides
- A login so you can get edit privileges
- A full hierarchy menu, so you can get to any page in your site
- Ability to change the look.
It is important that the emergency page does not fail for the same reasons site pages might fail. To make it robust, it completely ignores the site look, configuration, backgrounds, and styles.
The presence of the emergency page does not make the site any less safe becuase you still need a proper login to get edit priviledges. For example, here is a link to this user guide's emergency page. If you visit it you will see that it gives you no access that you did not already have.