fix show_message; better unauthorized message and redirection on edit page