Use URL dispatch for search and authentication views to avoid db calls in traversal.
authenticated_userid(request) -> request.authenticated_userid