Close modal after 5 seconds programmatically.