moved dynamic ui to server side
added protection to avoid overwriting existing lesson with new app