refactoring login box with social network