fix redirection for admin/staff and also display of error message