optionFactory.editOption(option.id, req.body.option, function (option) {
     if (option.id !== 0) {
         res.json({"success": option});
     } else {
         res.json({"error": errorFactory.getError('userOptionEdit')});
     }
 });
 optionFactory.getOption(req.session.user.id, function (option) {
     if (option.id === 0) {
         res.json({"error": errorFactory.getError('userNoOption')});
     } else {
         res.json({ "success": { "option": option }});
     }
 });
 optionFactory.createOption(req.session.user.id, req.body.option, function (option) {
     if (option.id !== 0) {
         res.json({"success": option});
     } else {
         res.json({"error": errorFactory.getError('userOptionCreate')});
     }
 });
    var checkLogin = function (req, res) {
        if (req.session.user === undefined || req.session.user.id === 0) {
            res.json({"error": errorFactory.getError('userNoOption')});
            return false;
        }

        return true;
    };
 userFactory.findUser(req.body.email, function (user) {
     if (user.id !== 0 && user.password === req.body.password) {
         req.session.user = user;
         res.json({"success": 'Login erfolgreich abgeschlossen'});
     } else { res.json({"error": errorFactory.getError('userLogin')}); }
 });