Can't log in to Drupal site: get redirected to random pages after submitting login form
I discovered that this was caused by faulty PHP in the template.php file of my Drupal theme. Probably spent more than 40 hours trying to troubleshoot this, when in the end it was some custom code in my theme!