Various security fixes to improve frontend security by moving functions that require elevated permissions to the backend.