     {JUser}= koding.models
     return JUser.authenticateWithOauth client, {provider, isUserLoggedIn}, (err, response) ->
 
-        return res.Status(400).send err  if err
+        return res.status(400).send err  if err
 
         # user is logged in and session data exists
         return res.redirect returnUrl  unless response.userInfo

        # if user is not logged in persist oauth information
        JUser.persistOauthInfo username, sessionToken, (err) ->

          return res.Status(400).send err  if err

          return res.redirect returnUrl


  # this is temporary solution for authenticating registered users
  return res.redirect(redirectUrl)  unless returnUrl

  return res.status(400).send err  if err

  isLoggedIn req, res, (err, isUserLoggedIn, account) ->

    return res.status(400).send err  if err

    # here session belongs to koding domain (not subdomain)
    sessionToken = req.cookies.clientId
