         
         res.send
             success: true
-            msg: "Log out succeeds."
+            msg: "Log out succeeded."
 
     # Create user with given credentials
     registerAction: (req, res) =>

            else
                req.logIn user, {}, answer

        req.body.username = "owner"
        authenticator(req, res)

    # Clear authentication credentials from session for current user.
    logoutAction: (req, res) =>

    authenticatedAction: (req, res) =>
        res.send success: req.isAuthenticated()

    authenticate: (req, res) =>
        # Check user credentials and keep user authentication through session.
        answer = (err) =>
            if err
                @sendError res, "Login failed"
            else
                @sendSuccess res, "Login succeeded"

        authenticator = passport.authenticate 'local', (err, user) =>
            if err
