see moreseek in the file member.php the line 538 and it modifies the sentence:
if( !$sUrlRelocate = $_REQUEST['relocate'] or basename( $_REQUEST['relocate'] ) == 'index.php' or basename( $_REQUEST['relocate'] ) == 'join.php' )
$sUrlRelocate = $_SERVER['PHP_SELF'];
the sentence "$sUrlRelocate = $_SERVER['PHP_SELF'];" indicates where you want to go after the loogin ($_SERVER['PHP_SELF'] = member profile). If you want to go to homepage, replace "$_SERVER['PHP_SELF']" with "index.php"