'use strict';

angular.module('myApp.home', ['ngRoute','firebase'])

// Declared route
.config(['$routeProvider', function($routeProvider) {
    $routeProvider.when('/home', {
        templateUrl: 'home/home.html',
        controller: 'HomeCtrl'
    });
}])

// Home controller
.controller('HomeCtrl', ['$scope','$firebaseSimpleLogin',function($scope, $firebaseSimpleLogin) {

 var firebaseObj = new Firebase("https://504-anecdotals.firebaseio.com");
 var loginObj = $firebaseSimpleLogin(firebaseObj);

}]);

$scope.SignIn = function($scope) {
 var username = $scope.user.email;
 var password = $scope.user.password;

 //auth logic will be here

};

'use strict';

angular.module('myApp.home', ['ngRoute','firebase'])

// Declared route
.config(['$routeProvider', function($routeProvider) {
    $routeProvider.when('/home', {
        templateUrl: 'home/home.html',
        controller: 'HomeCtrl'
    });
}])

// Home controller
.controller('HomeCtrl', ['$scope','$firebaseSimpleLogin',function($scope, $firebaseSimpleLogin) {

 var firebaseObj = new Firebase("https://504-anecdotals.firebaseio.com");
 var loginObj = $firebaseSimpleLogin(firebaseObj);

}]);

$scope.SignIn = function($scope) {
  event.preventDefault(); // to prevent form refresh
   var username = $scope.user.email;
   var password = $scope.user.password;
  }
  //auth logic is here
  loginObj.$login('password', {
    email: username,
    password: password
  })
  .then(function(user) {
      // Success callback
      console.log('Authentication successful');
  }, function(error) {
      // Failure callback
      console.log('Authentication failure');
  });

};

add simple login logic to home sign in controller