in the login behavior, when you select the password for element, the code for the value will look like:
<?php echo ((isset($_POST["password2"]))?$_POST["password2"]:""); ?>
edit that code to add the sha1() function:
<?php echo ((isset($_POST["password2"]))?sha1($_POST["password2"]):""); ?>