Unity Password Validation

In unity, how could I make it so that unity checks with a website to see if you have a valid game account before it lets you play the game? How would you make this password system on the website? Any ideas? Any other ways to keep people from using illegal copies of a game?
Thanks!

There are a couple of solutions out there, but the very basics is handling the login via server-side scripting and a database.

This looks like something that could lead you further into it.

Use WWW or WWWForm to talk to remote servers.

See Paj's Home: Cryptography: JavaScript MD5 for a Javascript implementation of MD5 which can be used to build login systems.

Note that this question is about authentication systems, and is not strictly about Unity.