Redirect After Facebook Login

I am using a tabs project.I am successfully logging into facebook and google, but need to redirect from the log-in view to a home view.

I am trying to use
$location.path("/tab/home");
However, after I enter my facebook/google password, I am stuck back on the log-in view.

Here is my full code for google-login

app.controller('googleLoginController', function($scope, $http, $firebaseAuth, $location) {
    var provider = new firebase.auth.GoogleAuthProvider();
    provider.addScope('https://www.googleapis.com/auth/analytics');
    $scope.googleLogin = function() {
    	console.log("I work");
        firebase.auth().signInWithRedirect(provider);
        firebase.auth().getRedirectResult().then(function(result) {
            if (result.credential) {
                var token = result.credential.accessToken;
                $location.path("/tab/home");
                //..
            }
            var user = result.user;
        }).catch(function(error) {
            alert(error.code);
            alert(error.message);
        });
    };
});