Keep money in the bank, grab teleportation/recall potions before you unghost.
Avoid fighting till you're ready, just quaff on sight.
Do NOT defend/retrieve if its a suicide mission. The IMMs will not frown on this. Don't even sit in your cabal if you can be summoned out.
If its just a nightmare login (air shifter scouting, no head as Rager and unable to retrieve, etc) then just log out. I don't like fair weather logins but at the end of the day this is a game and it should be fun. If you're not enjoying yourself play something else.