Yes, two-factor authentication is an excellent system to have in place for website logins. It requires an additional token when signing in, apart from the username and password. The premise here is that, even if a hacker has somehow gotten your credentials, they are unlikely to have your device (or whatever you use to receive the second token). This is an effective mechanism to thwart unauthorized access, and is already widely used on the internet.