var app = angular.module('farmplace', ['ui.router']);

app.config(['$stateProvider', '$urlRouterProvider', '$locationProvider', function($stateProvider, $urlRouterProvider, $locationProvider) {

  $stateProvider
    .state('landing', {
      url: '/',
      templateUrl: 'app/views/landing.view.html',
      controller: 'UserCtrl'
    })
    .state('signup', {
    	url: '/signup',
    	templateUrl: 'app/views/signup.view.html',
    	controller: 'UserCtrl'
    })
    .state('dashboard', {
      url: '/dashboard',
      templateUrl: 'app/views/dashboard.view.html',
      controller: 'UserCtrl'
    });

    $urlRouterProvider.otherwise('/');
    $locationProvider.html5Mode(true);
}]);
@@ -99,16 +99,33 @@
 ovider',
+ '$httpProvider',
  '$locat
@@ -182,16 +182,31 @@
 rovider,
+ $httpProvider,
  $locati
@@ -616,104 +616,809 @@
 r: '
-UserCtrl'%0A    %7D);%0A%0A    $urlRouterProvider.otherwise('/');%0A    $locationProvider.html5Mode(true);
+JobCtrl'%0A    %7D)%0A    .state('foSignup', %7B%0A      url: '/foSignup',%0A      templateUrl: 'app/views/foSignup.view.html',%0A      controller: ''%0A    %7D);%0A%0A    $urlRouterProvider.otherwise('/');%0A    $locationProvider.html5Mode(true);%0A%0A    $httpProvider.interceptors.push(%5B'$q', '$location', '$window', function($q, $location, $window) %7B%0A      return %7B%0A        'request': function(config) %7B%0A          config.headers = config.headers %7C%7C %7B%7D;%0A          if ($window.sessionStorage.token) %7B%0A            config.headers%5B'x-access-token'%5D = $window.sessionStorage.token;%0A          %7D%0A          return config;%0A        %7D,%0A        'responseError': function(response) %7B%0A          if (response.status === 403) %7B%0A            $location.url('/home');%0A          %7D%0A          return $q.reject(response);%0A        %7D%0A      %7D;%0A    %7D%5D);%0A
 %0A%7D%5D)

add .run for token headers