This was the initial cause of the problem with the login command. I can put this back since the login command doesn't use this code anymore.