var Backbone = require('backbone');
var Globals = require('../globals');

var Login = Backbone.Model.extend({
    initialize: function() {
        $.ajaxPrefilter(
            function(options, originalOptions, jqXHR) {
                options.xhrFields = {
                    withCredentials: true
                }
            }
        );
    },

    url : Globals.ApiUrl + '/user/login',
    defaults : {
        email: '',
        password: ''
    }
});


module.exports = Login;
