Authentication and db connection error handling