Changed the payload to use $scope in the login