Until then and so long are both casual ways of saying goodbye. So you might say it to your friends when you're going home, but you wouldn't say it to your teacher. For example, you go to a restaurant with your friend. After you eat, you will go to your house and your friend will go to his house. So you won't see each other for a while. But maybe you and your friend plan to go to another restaurant this weekend. "So long" means something like---> until we meet again after a long time...I'll be waiting. Or... I won't see you until we go to that restaurant on Saturday.