server wont crash anymore if there is no database, or if the query throws an error. Also added a new error page especially for database errors.