google login refactor