session: fixed bug with unbound msg variable when form is not valid