Refactor the task 'move_messages' to make use of the 'logout_on_failure'-decorator.