Fix errors or weird behaviour when starting the app but not logged in