Added functionality for encrypting passwords