added join to getPlayerByName for logged-in status; added block to restore if player logged in