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
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 :