Gem with implementation of oauth2 from Google for your application.