Remove the infinite loop in 'login' if there is no STDIN.