Added optional timeout to autohide the modal view