added js to hide flash messages after a certain amount of time