refactoring social connect authorization module