Gmail keeps logging me out when several accounts share one window

The pattern is specific enough to be diagnostic. One account stays signed in for weeks. Add a second and a third, and the sign-in screen starts appearing every morning, sometimes several times a day, usually after the last browser window was closed. Nothing is wrong with the accounts. What is being lost is the small file that proves the browser was already signed in, and there are a handful of ordinary settings that throw it away on a schedule.

What being signed out actually means

A sign-in does not live in the account. It lives in a cookie on the device. Google's own description of cookies puts keeping a user signed in at the top of the list of what they do, and Chrome's help page adds the consequence in plain language: deleting cookies may sign the user out of sites that remember them, and saved preferences can go with them. The same note appears on Google's page about clearing cache and cookies, which states that after clearing, a signed-in user will need to sign in again.

That reframes the problem. The question is not why Google is signing anyone out. The question is what on this Mac is deleting site data, and how often.

There are four ordinary answers, and one of them is a setting almost nobody remembers turning on.

The setting that empties the jar when the last window closes

Chrome has a per-site data control that decides what happens to the data a site stores on the device. Google documents three choices. Sites may be allowed to store data on the device, which it describes as the option most likely to make sites work as expected. Sites may be allowed to store data that is then deleted when all windows are closed. Or sites may not store data at all, which Google marks as not recommended.

The middle option is the one that produces exactly the symptom in question. Everything works perfectly through the day. Quit the browser, come back, and every account wants a password again. Google's own wording for that choice is that sites will mostly work as expected, but are less likely to remember the user on the next visit.

The path is Settings, then Privacy and security, then Site Settings, then Additional content settings, then On-device site data. Anyone who is being signed out after closing the browser, rather than at random moments during the day, should read that setting before changing anything else.

Two neighbouring settings do the same job by a different route. A browser configured to clear browsing data on exit through an extension or a cleanup utility has the same effect, and Google notes that some antivirus and related software deletes cookies on its own. Private browsing is the deliberate version of this: Google states that closing all private windows signs the user out automatically, which is the intended behaviour rather than a fault.

What Google's own checklist covers

Google publishes a short list of steps for the case where it keeps signing an account out, and it is worth reading because it rules out several theories at once.

The first item is to confirm that cookies are turned on, with the note that antivirus or related software may be deleting them. The second is to clear the browser cache if cookies are already on, with the warning that deleting cookies also removes saved settings for sites already visited. The third is to make sure the browser is on its latest version. The fourth is to let a browser such as Chrome remember passwords. The fifth applies to accounts using 2-Step Verification, where trusted computers can be added so that the second step is not demanded on every sign-in.

One more line on Google's cookie page is easy to miss and explains a whole class of confusion: signing out of Chrome signs the account out of Google on all websites. A single deliberate sign-out of the browser, or a profile that was reset, takes every Google session with it.

Two housekeeping steps belong in the same session, because a cluttered sign-in screen makes every real problem harder to read. Google documents how to remove an account from the sign-in page: open a browser where the account is signed in, go to the account page, select the profile picture, sign out or sign out of all accounts, then select "Remove an account" and remove the ones that are no longer used. Google adds that this has to be repeated in every browser where a sign-in happened, including Firefox and Safari, because the list is stored per browser. The device list is the other half. From the Google Account page, "Your devices" leads to "Manage devices", where an old machine can be removed, and Google notes that if a password is saved on someone else's device, changing the password and confirming the sign-out is the step that matters.

There is also a limit on temporary permissions worth knowing. When third-party cookies are blocked and a site is allowed temporarily from the address bar, Google states that the exception lasts 90 days in normal browsing mode, or for the length of the session in private mode. An exception that quietly expires looks exactly like a random sign-out three months later.

Why extra accounts make it worse

All of the above applies to one account. Several accounts in one browser window add a second, structural problem.

Google's documentation on signing in to multiple accounts is candid about the ambiguity. Accounts are described as having separate settings, but when several are signed in at once, Google states it cannot always tell which account is in use, and settings from the default account may be applied. The default account is the first one signed in, and the numbered addresses in the address bar reflect the order rather than any preference.

Because those sessions share one cookie store, anything that clears site data clears all of them together. There is no way to keep the client account signed in while resetting the personal one. The same is true of the on-device site data setting: it is a browser setting, not an account setting.

The numbering in the address bar is worth understanding for the same reason. The index reflects the order accounts were added in this browser, not a preference, so a bookmark saved while one account was first will open a different mailbox once the order changes. That is not a sign-out, but it produces the same feeling of being thrown out of the account that was expected, and it sends people to the sign-in screen unnecessarily.

The practical result is a familiar sequence. One account misbehaves. The advice found online is to clear cookies. Clearing cookies signs out all five accounts, and the next hour is spent collecting verification codes for accounts that were working fine.

Cause, symptom, and where to look

Symptom Likely cause Where to check
Signed out every time the browser is reopened On-device site data set to delete when all windows close Settings, Privacy and security, Site Settings, Additional content settings
Signed out of every Google site at once Signed out of Chrome, or the profile was reset Chrome profile, then sign in again
Signed out after a cleanup tool runs Antivirus or a cleaner deleting cookies The cleanup tool's own schedule and exclusions
Always signed out when the window closes Private browsing Use a normal window for accounts that need to persist
A second step demanded on every sign-in 2-Step Verification without a trusted computer Google Account security settings
The wrong account's settings applied Several accounts signed in, default account taking over The account switcher, and which account signed in first

Separating accounts so one reset stays local

Once the cookie settings are correct, the remaining exposure is that every account shares one container. Two arrangements fix that, and they differ in cost.

Chrome profiles

A Chrome profile keeps bookmarks, history, passwords and other settings separate, and Google recommends profiles for keeping work and personal accounts apart. Each profile has its own cookie store, so clearing one does not touch another. The cost is that a profile is an entire browser window with its own tab row, so three accounts mean three browser windows, and the only thing distinguishing them is a small avatar. Switching between them is a deliberate act rather than a keystroke.

One window per app, with its own container

The other approach keeps the window, not the browser, as the unit. Each web app runs in its own window with its own cookie container, so three mailboxes are three windows with three sessions that do not know about each other. Nothing clears them together, and no account can claim the default position, because there is no shared session to be default in. The page on Workspaces sets out that container model, and the Supported apps list shows the services people run this way, which is usually mail, chat and a document tool rather than a long list.

One habit is worth adopting whichever arrangement is chosen. Keep the account that holds client work in the container that is never used for casual browsing, since the sessions most worth protecting are the ones that cost the most to restore. Extensions, cleanup tools and privacy settings tend to be applied broadly, and a container that is only ever used for mail is a container nobody thinks to clean.

Either way, the rule that prevents the worst outcome is the same: never solve one account's problem by clearing data for all of them. When sessions are separated, that mistake stops being possible.

A five minute check, in order

Start with the on-device site data setting, because it explains the most common version of the symptom and takes one minute to read.

Then look at whether anything else on the Mac is clearing site data. Cleanup tools, privacy extensions and antivirus software all do this, and Google names antivirus explicitly in its own guidance.

Then confirm the browser is current, since Google lists an outdated browser among the causes.

Then check 2-Step Verification. Being asked for a second factor on every sign-in is a different problem from being signed out, and adding trusted computers is the documented answer.

Only after those four steps should cookies be cleared, because clearing is the step that costs an hour when several accounts share one window.

What to change first

Read the on-device site data setting today and set it to allow sites to store data, unless there is a specific reason not to. Then stop running several Google accounts through a single window, because that is the reason a fix for one account keeps breaking the others. Giving each mailbox its own window and its own session is what SpaceDeck was built for, and it turns a shared cookie jar into separate ones.

Frequently asked questions

Why does Gmail stay signed in on one account but not on three?

The sign-in lives in a cookie, and all accounts in one browser window share one cookie store. Anything that clears site data clears every session at once, and Google notes that when several accounts are signed in it cannot always tell which one is in use, applying settings from the default account. Separate containers remove both problems.

Is a sign-out on every restart a Google problem or a browser problem?

Almost always a browser setting. Chrome can be configured to delete the data a site stored on the device once all windows are closed, which Google describes as making sites less likely to remember the user on the next visit. That is the behaviour being reported, and it is found under Settings, Privacy and security, Site Settings, Additional content settings.

Will clearing cookies fix it?

It may, but it signs out every site that remembers a session, and Google warns that saved site settings are removed with them. For anyone holding several accounts, clearing is the most expensive step available, so it belongs at the end of the checklist rather than the start.

Why is a verification code required every single time?

That is 2-Step Verification rather than a lost session. Google's guidance for accounts that keep asking is to add trusted computers, so the second step is not requested on a device that has already been verified. If the browser is also deleting site data on exit, the trusted state will be discarded along with everything else.

Do Chrome profiles solve this?

They solve the shared cookie store, since each profile keeps its own passwords, history and site data. What they do not solve is convenience: every profile is a separate browser window with its own tab row, and switching between three of them all day is its own kind of friction. A window per app with its own container gives the same isolation with one less thing to manage.

Back to all posts