             res.render file, opts
           currentPerson: person
           setCurrentPerson: (person, options) ->
-            @cookie 'authkey', person?.authKey(), options
+            @cookie 'authKey', person?.authKey(), options
           redirectToTeam: (person, alternatePath) ->
             Team.first { 'members._id': person._id }, (error, team) =>
               if team?

        @errors = errors
        @render 'teams/new.html.haml'
      else
        @cookie 'teamauthkey', @team.authKey()
        @redirect '/teams/' + @team.id()

# show team

          res: res
          next: next
          redirect: __bind(res.redirect, res),
          cookie: (key, value, options) ->
            value ||= ''
            options ||= {}
            cookie = "#{key}=#{value}"
            for k, v of options
              cookie += "; #{k}=#{v}"
            res.header('Set-Cookie', cookie)
          render: (file, opts) ->
            opts ||= {}
            opts.locals ||= {}
