If you were killed, then you go back to the base you last docked. Because, your ship remains without shields for about a minute when you are disconnected. In that time, players or NPCs can kill you, making you to respawn normally when you log in again.
Sometimes when you get disconnected by the server it can send you back to one of the bases that you recently undocked from, i have yet to find a way to fix it on the clients end, but i would suggest that you try talking every now and then in the console chat to make sure that you haven't been disconnected by the server yet.
Signatures may not be bigger than 700x250, 1MB. ~Skorak