Fix crash in settings. Also fix an access token issue on logout