updated temp password handling