[terminal] Fix login loop.