In the first instance I'd suggest enabling debugging by adding these lines to config.php:
@error_reporting(E_ALL | E_STRICT);
$CFG->debug = (E_ALL | E_STRICT);
$CFG->debugdisplay = 1;
These need to come before the require_once(__DIR__ . '/lib/setup.php'); line at the end.
Then try logging in again and see if there's any error message on screen or in your web server's error log.