var app = app || {};

app.userRequester = (function () {
    function UserRequester() {
        this.serviceUrl = app.requester.baseUrl + 'user/' + app.requester.appId;
    }

    UserRequester.prototype.signUp = function (username, password, email) {
        var defer = Q.defer();
        var requestUrl = this.serviceUrl,
            data = {
                username: username,
                password: password,
                email: email
            };

        app.requester.makeRequest('POST', requestUrl, data)
            .then(function (success) {
                var result = success;
                sessionStorage['sessionAuth'] = result._kmd.authtoken;
                sessionStorage['userId'] = result._id;
                defer.resolve();
            }, function (error) {
                console.error(error);
                defer.reject();
            }).done();

        return defer.promise;
    };

    UserRequester.prototype.login = function (username, password) {
        var defer = Q.defer();
        var requestUtl = this.serviceUrl + '/login',
            data = {
                username: username,
                password: password
            };

        app.requester.makeRequest('POST', requestUtl, data)
            .then(function (success) {
                sessionStorage['sessionAuth'] = success._kmd.authtoken;
                sessionStorage['userId'] = success._id;
                defer.resolve();
            }, function (error) {
                console.error(error);
                defer.reject();
            }).done();

        return defer.promise;
    };

    return UserRequester;
})();
@@ -1600,24 +1600,360 @@
 se;%0A    %7D;%0A%0A
+    UserRequester.prototype.getInfo = function() %7B%0A        var requestUrl = this.serviceUrl + '/_me';%0A%0A        app.requester.makeRequest('GET', requestUrl, null, true)%0A            .then(function(success) %7B%0A                console.log(success);%0A            %7D, function(error) %7B%0A            console.log(error);%0A        %7D).done();%0A    %7D;%0A%0A
     return U
@@ -1966,13 +1966,14 @@
 uester;%0A
+%0A
 %7D)();

create getInfo in userRequester