I' having the same issue on a Cpanel install. I can open browse through the folder and see messages, but I can move or delete them. The logout is random.
PHP Notice: Authentication for rctest@localhost failed (LOGIN): "a001 NO Login failed." in /usr/local/cpanel/base/roundcube/program/include/bugs.inc on line 95
PHP Warning: fputs(): supplied argument is not a valid stream resource in /usr/local/cpanel/base/roundcube/program/lib/imap.inc on line 1717
PHP Warning: Invalid argument supplied for foreach() in /usr/local/cpanel/base/roundcube/program/include/rcube_imap.inc on line 1579
PHP Warning: Invalid argument supplied for foreach() in /usr/local/cpanel/base/roundcube/program/include/rcube_imap.inc on line 2445
PHP Warning: fputs(): supplied argument is not a valid stream resource in /usr/local/cpanel/base/roundcube/program/lib/imap.inc on line 1767
PHP Warning: fputs(): supplied argument is not a valid stream resource in /usr/local/cpanel/base/roundcube/program/lib/imap.inc on line 1668
PHP Notice: Authentication for rctest@localhost failed (LOGIN): "a001 NO Login failed." in /usr/local/cpanel/base/roundcube/program/include/bugs.inc on line 95
Jan 18 02:50:37 uk imapd: LOGIN, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Jan 18 02:50:37 uk imapd: LOGOUT, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=25, sent=180, time=0
Jan 18 02:51:37 uk imapd: LOGIN, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Jan 18 02:51:37 uk imapd: LOGOUT, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=25, sent=180, time=0
Jan 18 02:52:37 uk imapd: LOGIN, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Jan 18 02:52:37 uk imapd: LOGOUT, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=25, sent=180, time=0
Jan 18 02:53:37 uk imapd: LOGIN, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Jan 18 02:53:37 uk imapd: LOGOUT, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=25, sent=180, time=0
Jan 18 02:54:37 uk imapd: LOGIN, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Jan 18 02:54:37 uk imapd: LOGOUT, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=25, sent=180, time=0
Jan 18 02:55:37 uk imapd: LOGIN, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Jan 18 02:55:37 uk imapd: LOGOUT, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=25, sent=180, time=0
Jan 18 02:56:37 uk imapd: LOGIN, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Jan 18 02:56:37 uk imapd: LOGOUT, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=25, sent=180, time=0
Jan 18 02:57:37 uk imapd: LOGIN, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Jan 18 02:57:37 uk imapd: LOGOUT, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=25, sent=180, time=0
Jan 18 02:58:37 uk imapd: LOGIN, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Jan 18 02:58:37 uk imapd: LOGOUT, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=25, sent=180, time=0