updated Encrypt class and auth controller of CMS for better security