As for being attacked offline, thems the breaks. Think of it this way: Just because you go to sleep in your home doesn't mean you can't be attacked. Someone could break into your home and get you while you're asleep.
Pleasant dreams!
*edit to say* My advice for you is to forget the random pvp attack and concentrate on leveling, unless pvp is your thing. at your level, people attack the heck out of each other for gold all of the time. Never carry a lot of gold on you. Make your deposits, and if you still have too much, go to the AH and bid on something. (Plan your gear a few levels ahead, and buy gear accordingly). Once you get 100k in gold saved, buy a fsp, and use that to buy bounty tickets. Then you're set to punish someone who attacks you.



