you want to leave phpmyadmin on server, hm
Two solutions:
first:
If you want to have logon and logout you must write a php modul (simple script to handle user, cooki, session...).
With php modul you must protect main file and config.inc.php which is your configuration file (server, user, pass...)
second:
The best way is to protest whole folder (if you have telnet access to server) with is .htaccess
but this option is w/o logout
http://faq.clever.net/htaccess.htm
http://he.net/~jdoe/info/htaccess/demo.html