printing to console is segfaulting on login