Why is this happening
The Global Configuration’s permissions for “Admin Login” has been set to allowed for the Public group. This could occur through a bad default or a user misconfiguration.

How to fix
There are two methods that should fix this. The first method doesn’t require any modifications to core files and fixes the root cause of the problem (recommended). The second method requires a core file change and should only be attempted if the first method failed.
First Method
1) Browse to /administrator/?option=com_login
2) At the login form, enter a super user’s username and password
3) Go to Site->Global Configuration then click on the “Permissions” tab
4) Under the Public drop down, set the “Admin Login” to “Not Set”. Note: you should set all values in this Public drop down list to “Not Set”
5) Click Save & Close
6) Try to log out and if the login form appears, this method worked and your site should be fixed.
Assumption: the “Guest User Group” setting located in the “User Manager” options is set to ‘Public’.
Second Method
Replace the contents of /administrator/includes/helper.php with the contents on https://raw.github.com/joomla/joomla-cm … helper.php. This fix will be included in J! 2.5.5.
After regaining access, you should go to the Global Configuration->Permissions then set the Public “Admin Login” to “Not Set”. It might be a good idea to check all the permissions in this section to ensure it has the correct settings.