                 return
 
             dbg("passport created: set remember_me cookie, so user gets logged in")
-            locals.target = BASE_URL + "/app#login"
 
             # create and set remember_me cookie, then redirect.
             # See the remember_me method of client for the algorithm we use.

        has_valid_remember_me : false
        account_id            : undefined
        email_address         : undefined
        cookies               : new Cookies(opts.req, opts.res)

    ## dbg("cookies = '#{opts.req.headers['cookie']}'")  # DANGER -- do not uncomment except for debugging due to SECURITY

    ], (err) ->
        if err
            opts.res.send("Error trying to login using #{opts.strategy} -- #{err}")
        else
            dbg("redirect the client")
            opts.res.redirect(locals.target)
        opts.cb?(err)
    )

