Now, you really can live forever, but that’s not necessarily a good thing.

Many of your online accounts – from automatic bill payments to eBay – may remain active after you pass away, unless you take steps to ensure they don’t, says attorney Hillel Presser, author of “Financial Self-Defense (Revised Edition).”

Automatic bill pay, for example, can theoretically keep tapping your bank account long after you’re gone or, at least, until your money is.

“It’s important to make sure your online bank and shopping accounts, even your social media, can be closed out, or that your loved ones are authorized to access them,” Presser says. “You may ask, ‘Why would I care if I’m gone?’ I can tell you from experience: because it can create real headaches, and more heartache, for your family.”

Bank and shopping accounts will be vulnerable to identity theft, which would affect your estate if someone opens credit cards in your name. You might have valuable intellectual property, like domain names. They may need access to your health records, particularly if you died under questionable circumstances, he says.

There’s the sentimental stuff – photos and emails — that your family may want as a remembrance of you, and the libraries of music and ebooks, which may represent a considerable investment on your part.

“The problem is, even if you provide a family member with all of your accounts, log-ins and passwords, they may not be legally allowed to access them,” Presser says. “In many cases, they may be violating the accounts’ terms of service or violatingfederal privacy and computer fraud laws. Some states have laws governing online materials, but they’re different and which of your accounts are covered depends on where the provider is located.”

What can you do to ensure your family isn’t left with a virtual nightmare after your passing? Presser offers these tips:

• Create a list of all of your accounts, including log-innames, passwords, and answers to any security questions. Obviously, your list will need to be securely stored. Since you’ll need to update it regularly as you add accounts or change passwords,  it will be easiest if you keep the list on your computer in a password-protected folder. Some versions of Windows allow you to create protected folders, but you may need to get third-party software to do this, such as freeAxCrypt. Remember to create a backup of your list, whether it’s on a jump drive or printed out on paper. Store the backup in a secure place such as a safe deposit box. Do not put password information in your will, which is a public document.

• If you have a Google account, set up the new inactive account manager. In May 2013, Google became the first site to give users an option for choosing what becomes of their content if they should become debilitated or die. Under the profile button, click “Account,” scroll down to “Account Management,” and you’ll find instructions for “Control what happens to your account when you stop using Google.” You can select how long the account should be inactive before your plans are set into motion; choose to whom you want to offer content, such as YouTube videos, Gmail, Google+ posts, Blogger and Picasa web albums, or whether it should simply be deleted.

• Appoint a digital executor. Perhaps the simplest way to ensure your online life is taken care of is to appoint a digital executor – a tech-savvy person who will be willing and able to carry out your wishes. Authorize the person to access your inventory of log-in information and spell out what you want done with each account, whether it’s providing access to loved ones or business partners, or deleting it.

The digital world has grown and transformed so rapidly, the law hasn’t kept up, which makes managing your digital afterlife challenging, Presser says.

“Until there are more consistent laws and procedures governing this area, it’s best to plan ahead, leave clear instructions and be sure you have a list of accounts where your estate lawyer or a loved one can find it and access it,” he says. “It will make a world of difference to your survivors.”