How to fix a crashing login shell?