   next()
 
 loginBeforeTwitterLastStep = (req, res, next) ->
+  return next() if req.user
   passport.authenticate('twitter',
     callbackURL: "#{opts.APP_URL}#{opts.twitterLastStepPath}"
   )(req, res, next)
 
 submitTwitterLastStep = (req, res, next) ->
   return next "No user" unless req.user
-  return next "No email provided" unless req.param('email')?
+  return next "No email provided" unless req.body.email?
   request.put("#{opts.SECURE_ARTSY_URL}/api/v1/me").send(
-    email: req.param('email')
-    email_confirmation: req.param('email')
+    email: req.body.email
+    email_confirmation: req.body.email
     access_token: req.user.get('accessToken')
   ).end (r) ->
     err = r.error or r.body?.error_description or r.body?.error

  app.post opts.twitterLastStepPath, submitTwitterLastStep
  app.use headerLogin
  app.use addLocals

localAuth = (req, res, next) ->
  passport.authenticate('local', (err, user, info) ->

      return next err if err
      req.login req.user.set(r2.body), (err) ->
        return next err if err
        res.redirect req.query['redirect-to'] or req.body['redirect-to'] or '/'

headerLogin = (req, res, next) ->
  return next() if req.path is opts.logoutPath
