register alert message and redirect