Added password encryption and relevant unit tests to the User model