Adds requires_user argument to api decorator