'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

};

@@ -537,16 +537,71 @@
 cope) %7B%0A
+  event.preventDefault(); // to prevent form refresh%0A  
  var use
@@ -627,16 +627,18 @@
 .email;%0A
+  
  var pas
@@ -667,17 +667,21 @@
 ssword;%0A
-%0A
+  %7D%0A 
  //auth 
@@ -690,20 +690,295 @@
 gic 
-will be here
+is here%0A  loginObj.$login('password', %7B%0A    email: username,%0A    password: password%0A  %7D)%0A  .then(function(user) %7B%0A      // Success callback%0A      console.log('Authentication successful');%0A  %7D, function(error) %7B%0A      // Failure callback%0A      console.log('Authentication failure');%0A  %7D);
 %0A%0A%7D;

add simple login logic to home sign in controller