I have solved the problem. It's just because that when sqlplus start, it only check the current directory to see if there is a login.sql, so if I first switch the directory into the one where login.sql reside, it will then work properly!