telnetd: fix bad interaction with vhangup() from login