Added a check for client credentials
Altered the way in which the MD5 client password is saved in the database