Key() refactored to UserKey()
Return JSON or redirect.