iOS4 has several classes of background apps. Unfortunately, IM is not one of those classes. The classes that do exist are for essentially for voip (network socket maintenance), audio (audio processing) and location services (full multi tasking) . Having run Monal in the background for a few weeks and seen the battery life, I now understand why Apple has done this. You are always aware of and interacting in some way with all of the classes of background apps allowed. You are either making a voip call, listening to audio or using the GPS navigation. At no time do any of these background apps run with the user not aware of it. IM on the other hand is expected to run at all times. It runs silently in the background, using the cpu , keeping a connection open and generally draining the battery. It is entirely possible for someone to run an IM app, not be aware it is running and then begin to wonder why the battery only lasts a couple of hours. I have seen this happen time and again to android users. Power users may be able to use the task manager to kill processes, but that is unreasonable for a mass market product.
How Monal Works
All of that being said, Monal does run in the background and the way it does it should satisfy the needs of most users. Monal runs in the background for 10 minutes. After 5 minutes of idle time, it will push a notification that only 5 more minutes of background time remain. After 10 minutes, the program will logout and suspend itself. A suspended program is not a drain on the battery. If at any point in the 10 minutes you bring Monal back to the foreground, the clock will be reset for a fresh 10.
When Monal is running in the background, it will push notifications to the user when messages are received. The user will view/reply to the message and thus continuously reset the 10 minute clock.
I think the typical user would sign in and move Monal to the background and do other things. They either send and receive messages and continuously reset the 10 minute clock or at 5 minutes are asked to renew it for another 10 minutes by brining Monal the the foreground once. This prevents the scenario where someone signs in and forgets to sign out, locks the phone and then completely drains the battery.
What if someone wants to stay signed in while the phone is idle ?
If you want to remain signed in while not using the phone, move Monal to the foreground before locking the phone. If you do this you will always be signed in and will receive notifications for all messages. When you want to use the phone again you can move it to the background and renew the 10 min lease periodically.