Changed the password type to MD5 encryption
Optimized code