WordPress redirects to old login after migration

Try to add the following two lines in wp-config.php file:

define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');