Stackoverflow uses different ways to login to their website, e.g. with the facebook login.
With the facebook social plug-ins (see social plugins) you can add a like
The Facebook Login plugin only provides a way for you to log the user into your website. You must do the Link to your internal system yourself (as StackOverflow does). This means creating a new "User" based on the Facebook User's details.
For example, if you website uses email address as the "username", then you must ask facebook users to provide their email address or ask for the email address permission. Then, you create a new account for the user and give them a random password.
You must also change the login flow so existing users can sign-in with their email / password or their associated Facebook Account.