cannot login after theme change or backup/restore
Try the following:


check the existence of .htaccess file in Drupal root
truncate the cache tables in the database
check and eventually increase the PHP memory limit in /etc/php5/cli/php.ini
Read and check some other trouble shooting ideas at
http://drupal.org/node/158043