Fix compile errors
Modernize utmp/tty handling