Appreciate your reply SKaero. Sorry for the delayed response, but 4am in the morning here when you replied!!
I've enabled imap_debug and tried again to login and this is what it logged
[12-Aug-2012 08:04:37 +0800]: [60FA] S: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=CRAM-MD5] Dovecot ready.
[12-Aug-2012 08:04:37 +0800]: [60FA] C: A0001 ID ("name" "Roundcube Webmail" "version" "0.7.2" "php" "5.3.3" "os" "Linux" "command" "/rc/")
[12-Aug-2012 08:04:37 +0800]: [60FA] S: * ID NIL
[12-Aug-2012 08:04:37 +0800]: [60FA] S: A0001 OK ID completed.
[12-Aug-2012 08:04:37 +0800]: [60FA] C: A0002 AUTHENTICATE CRAM-MD5
[12-Aug-2012 08:04:37 +0800]: [60FA] S: + PDkxNzgzMTk0NTMyNjAyNzMuMTM0NDcyOTg3N0BiazEuc2VydmVyPg==
[12-Aug-2012 08:04:37 +0800]: [60FA] C: cGV0ZXIgMTEwYWZhMmI0ZDIwNmMwYzg1MGE1NmU4YzRkZDhmOWQ=
[12-Aug-2012 08:04:39 +0800]: [60FA] S: A0002 NO [AUTHENTICATIONFAILED] Authentication failed.
[12-Aug-2012 08:04:39 +0800]: [60FA] C: A0003 LOGOUT
[12-Aug-2012 08:04:39 +0800]: [60FA] S: * BYE Logging out
[12-Aug-2012 08:04:39 +0800]: [60FA] S: A0003 OK Logout completed.
I know it looks like I simply input the incorrect password, but I can assure you that I didn't and it does work, if I set /etc/dovecot/dovecot.conf to "authenticate = plain".
Thanks for your attention to this.
Peter