Last few weeks i was busy migrating multiple clusters across this region. Post migration couple of clusters throw me the message “Non Defined IMS Exception” when i enter the username and password.

Its a Bug (CSCvp43563 ) which you need to work with TAC.
Before you work Cisco TAC, follow the below steps and copy the Dkey.txt and encrypted.Dkey.txt files from your old cluster. This will save your time.
In order to fix this issue we need to create root access before so we can apply the workaround mentioned in the bug:
Create a Root Account on old cluster
utils remote_account status
utils remote_account disable
utils remote_account enable
utils remote_account create ciscotac 1
If your old cluster is <CSR 12.5 use UCOS Password Decrypter.exe tool to decrypt the root passphrase. For CSR 12.5 you cannot use this tool. you need to work with Cisco tac to decrypt the passphrase.
Then can apply the below workaround:
On source cluster, in root:
1. cd /usr/local/platform/.security/CCMEncryption/keys/
2. sftp user@IP
3. put dkey.txt
4. put encrypted_Dkey.txt
On destination cluster, in root:
1. cd /usr/local/platform/.security/CCMEncryption/keys/
2. sftp user@IP
3. get dkey.txt
4. get encrypted_Dkey.txt