added AES encrpytion for passwords, refactoring