fixed bug when logging in to new terminal