fix screen minimized after login. store the global loggined state in persistent storage.