module.exports = (function () {
  var Resource = require('./resource.js')
  function Users (master) {
    Resource.call(this, master)

    this.name = 'users'
    this.endpoint = '/' + this.name
  }

  Users.prototype = new Resource()

  Users.prototype.authenticate = function (email, password, options) {
    var payload = {
      email: email,
      password: password
    }
    return this.master._Post('/users/authenticate', payload, options)
  }

  return Users
})()
