If you have disabled cookies you won't be able to remain signed in. Here's how to ensure that cookies are enabled for a few common web browsers:
Safari: In the Safari menu, choose "Preferences". Choose "Privacy" from the list at the top of the window. Under "Cookies and Website Data", make sure that "Block all cookies" is not selected.
Edge: Select the 3 dot menu in the upper right of the browser and choose "Settings." Select "Site Permissions" and choose "Cookies and site data." Make sure that either "Allow sites to save and read cookie data" is turned on, or add scratch.mit.edu to the "Allow" list.