.controller('LoginGoogle', function($scope, UserService, sessionService, $ionicLoading) {
// This method is executed when the user press the "Sign in with Google" button
$scope.googleSignIn = function() {
$ionicLoading.show({
template: 'Aguarde...'
});
window.plugins.googleplus.login(
{},
function (user_data) {
// For the purpose of this example I will store user data on local storage
UserService.setUser({
user_id: user_data.userId,
nome: user_data.displayName,
email: user_data.email,
user_foto: user_data.imageUrl,