I do not know the reason for what you are observing. However it is important to note that sometimes things like this are caused for technical reasons, and it can be really embarrassing if you just assume that the other person is doing it intentionally and send them an angry message about it, when in reality it is just some technical side-effect or glitch and the other person was not even aware of it.
If I were you, I would give her the benefit of the doubt, or at least reserve judgement until I know more, because I would hate to make myself look like a fool for getting all worked up about something that was only technical phenomena. I have seen it happen to other people. Fortunately you have not sent her any angry message, so no harm done.
For example, a technical phenomena might be something like the following. I am just inventing this as a fictional example, but it is based on real phenomena I have observed elsewhere. She fails to close the AIM program before disconnecting from the internet (she is on dial-up modem). This means she did not log out of the AIM service in the correct manner. This may mean the AIM service has no knowledge of the fact that she is no longer on the internet, because of the lack of a proper logout command.
However, when you come online, the AIM service attempts some kind of communication with her AIM client program, perhaps to notify it that you are now online so it can display this status information. This communication fails because she is no longer on the internet. The AIM service realizes that the communication has failed, and then realizes that she is no longer on the internet, and so then changes her status within the AIM service to offline, and then sends notification of this change to everyone logged in, including yourself.
In other words, in this fictitious example, what you think is her logging off when she sees you is in reality the AIM service realizing that she is no longer connected to the internet, and updating her status accordingly.
Other technical explanations are also possible.