modified the termine-related functions and class to handle getting the username too