Translations:Manual:$wgReadOnly/15/en

If you want to enable logins while the database is readonly, at least $SessionCacheType needs to be set to some real non-DB caching mechanism.