If you are on the home screen and someone IMs you, you will not get the message. You need to open the app again and they will show up. If you stay out of the app for any longer than 5 minutes, you will be disconnected. If you want to stay logged in while you turn the screen off, have AIM be the last application you have open before doing so.