The problem for incorrect login for Horde webmail OR the IMAP problem for Squirrelmail is often caused due to failure of the IMAP service on the server.
We first need to try restarting the service. Sometimes the IMAP service is not restarted even after the following commands :
service xinetd restart
OR
/etc/rc.d/initd.d/xinetd restart
OR
/scripts/restartsrv_xinetd
OR
/scripts/restartsrv_inetd
OR
/scripts/imap
This means that the IMAP service is in a hung state and it needs to be killed and restarted. When any of the above commands do not work, then try this :
killall -KILL cpimap
This should kill the IMAP on the server. Then restart the service using :
/scripts/restartsrv_imap
AND
/scripts/restartsrv_xinetd