Added password functions to User and associated tests