             res.end html
   ]
 
-  ['/r/:key/recv', (req, res) ->
+  [wrappers: [require_login],
+   '/r/:key/recv', (req, res) ->
     switch req.method
       when 'GET'
         key = req.path_data.key

          res.redirect req.url
  ]

  ['/submit', (req, res) ->
    if not req.current_user?
      render_layout "login.jade", {message: 'You need to log in to submit'}, req, res
      return
    switch req.method
      when 'GET'
        render_layout "submit.jade", {headerbar_text: 'Submit', type: (req.query_data.type or 'link')}, req, res

        res.simpleJSON(200, watching)
  ]

  [wrappers: [require_login],
   '/r/:id/delete', (req, res) ->
    switch req.method
      when 'POST'
        rid = req.path_data.id
