Loading screen and different error handling

(copied from screeny05/SynergyTube)

Also added a str_replace in case the error message markup contains
double quotes.