CUPERTINO (CBS SF) — Several days after hackers flooded the internet with nude photos stolen from dozens of celebrities, Apple CEO Tim Cook said it plans to add new features to keep hackers out of iCloud accounts.

In an interview with The Wall Street Journal, Cook said Apple would alert users when someone tries to change an account password, restore data from iCloud to a new device or when a device logs onto the user’s iCloud account for the first time.

READ MORE: VIDEO: Smash-And-Grab Robbery At Tanforan Mall Jewelry Store

The alerts would come to users via email and push notifications. Apple said the alerts would begin in two weeks.

READ MORE: Officers Rescue Injured Hawk 'Eddy' In San Francisco's Tenderloin District

Cook also said the Cupertino-based tech giant would expand the use of “two-factor authentication,” which is currently not being used by a majority of users. When the feature is activated, users would be required to submit two out of three things to gain access: a password, a separate four-digit one-time code, or a long access key.

The chief executive told the paper that the celebrities’ iCloud accounts were compromised when hackers correctly answered security questions to obtain the passwords. Celebrities were also victimized by a phishing scam, but Cook said no Apple IDs or passwords leaked from their servers.

MORE NEWS: CHP: Police Activity Closes Westbound I-80 on Carquinez Bridge

More than 100 celebrities, including actress Jennifer Lawrence, reality TV star Kim Kardashian and model Kate Upton, had their photos stolen by the hackers.