(function (module) {
    module.controller('LoginController', LoginController);

    LoginController.$inject = ["$state", "User", "toastr",
        "mcapi", "pubsub", "model.projects",
        "projectFiles", "$anchorScroll", "$location"];

    /* @ngInject */
    function LoginController($state, User, toastr, mcapi, pubsub, projects, projectFiles, $anchorScroll, $location) {
        var ctrl = this;

        ctrl.cancel = cancel;
        ctrl.gotoID = gotoID;
        ctrl.login = login;

        ////////////////////

        function login() {
            mcapi('/user/%/apikey', ctrl.email, ctrl.password)
                .success(function (u) {
                    User.setAuthenticated(true, u);
                    pubsub.send("tags.change");
                    projects.clear();
                    projectFiles.clear();
                    projects.getList().then(function (projects) {
                        if (projects.length === 0) {
                            $state.go("projects.create");
                        } else {
                            $state.go('projects.project.home', {id: projects[0].id});
                        }
                    });
                })
                .error(function (reason) {
                    ctrl.message = "Incorrect Password/Username!";
                    toastr.error(reason.error, 'Error', {
                        closeButton: true
                    });
                }).put({password: ctrl.password});
        }

        function cancel() {
            $state.transitionTo('home');
        }

        function gotoID(id) {
            // set the location.hash to the id of
            // the element you wish to scroll to.
            $location.hash(id);
            // call $anchorScroll()
            $anchorScroll();
        }
    }

}(angular.module('materialscommons')));

@@ -189,24 +189,8 @@
     
- %22projectFiles%22,
  %22$a
@@ -214,16 +214,31 @@
 ocation%22
+, %22Restangular%22
 %5D;%0A%0A    
@@ -332,22 +332,8 @@
 cts,
- projectFiles,
  $an
@@ -353,16 +353,29 @@
 location
+, Restangular
 ) %7B%0A    
@@ -807,27 +807,67 @@
     
-projectFiles.clear(
+Restangular.setDefaultRequestParams(%7Bapikey: User.apikey()%7D
 );%0A 

Remove reference to projectFiles. Have Restangular set the apikey as a default param.