On live servers this is possible, Except you cannot cast spells while you are logging out. If you are in places like Nagrand arena on private servers and you just wanna screw around and freak people out. use this macro after you've flown up in the air to a nice spot.
Make this macro;
It will dismount you and start the 20 second logout countdown. During this time your floating in the air and you can attack people and cast spells. You might die if you don't leave combat in time for remount before the 20 seconds is up.Code:/logout /dismount
I considered this a bug because you aren't supposed to be able to cast spells during the 20 second logout delay.