So I played single player for a while, then joined my friends game through direct connect. I was surprised to see i had kept my ship, but didn't care much because it just gave me a slight advantage. (I understand this isn't a bug). After returning to my single player world, my ship kept the upgrades i received form my friends direct connect game. (still not a bug i don't think). The problem came when I joined a server that didn't let me keep my ship. At first nothing was wrong, i just got bored of the server and went back to my friends game. Suddenly, I had a new ship in my friends world. So I went to the nearest town to see if my ship upgrades were still unlocked; they weren't. It appeared my friends game was treating me as a new player. To make sure that at least my single player world was ok, I opened the world to check it out. Sure enough, the ship I once had was completely gone and even worse was now the members of the blue faction (the faction I was in) were attacking me even though I was still in the blue faction.
From a programmers standpoint, it appears you (the developer) save the information of ship and faction for the account and not for the game file. You should save it for the game file.