MacOS terminal "login: illegal option -- e"
The problem is occurring because of an improper account name beginning with the dash ("-") character. So the solution is changing the name of the account via the steps given in this link: https://support.apple.com/en-us/HT201548

When you open the terminal an automatic login command like login -pf [account-name] is executed. Let's say the account name is "-gi". In this case the command will be login -pf -gi and naturally, the terminal will show the error illegal option -- g. Therefore you should change the account name properly.