fix permission error after login