I was faced with that question, Googled it, and found that adding the following to wp-config.php fixed the problem:
define('FS_METHOD', 'direct');
Thanks to Keith for figuring out why WordPress was asking me to log in just to install a new theme.
EDIT: Dude, this fixes problems with installing new plugins too.