Rewrite password digest can't be blank message and delete redundancy