fix flatpages api permissions
fix course home links
remove unused imports