update for close flashes messages.

Also suitable for asynchronous messages.
Merge pull request #39 from pvvsecl/patch-1

update for close flashes messages.