fixing and refactoring social login methods