First and foremost, if restarting the computer logs you out, the culprit might be your browser clearing out the saved passwords. Adjusting the settings can help retain login details, and to do so, ...
Locked out of your Mac? You can still get back in without losing important files. Here are all the ways you can regain access to your Mac.