basic loading overlay directive
add error handling functionality to loading overlay