added new check in updatePassword REST call. Checks previous password for vaildity