refactoring google login