How do I log in if I can not get the login prompt page to come up as it should?
Drush
  
  To get one-time login for the specific user, use this syntax:

drush uli &lt;user&gt;

  
  Where &lt;user&gt; is either uid (e.g. 1), user name, or email address
  for the user.
  
  Custom code
  
  You can use user_pass_reset_url() function in your
  custom code.
  
  Generates a unique URL for a user to login and reset their password.
  
  Ex: 

$uid = 1;
$account = user_load($uid);
$link = user_pass_reset_url($account);



Source: Kenorb's answer to How to get one time login for all the users?