Implement google authorization via google js api (part 1)