refactored google account logic