Extract EncryptedUser functionality for use in other controllers