Yes, the $smart_redirect isn't all that smart at the moment!
If you want to change where the user is redirected to, you need to insert some lines.
Look for (around line 253):
if ( $userdata['session_logged_in'] )
$u_login_logout = LOGIN_MG . '?logout=true&sid=' . $userdata['session_id'];
$l_login_logout = $lang['Logout'] . ' (' . $userdata['username'] . ') ';
$l_login_logout2 = $lang['Logout'];
// $smart_redirect = strrchr($_SERVER['PHP_SELF'], '/'); // uncomment these two lines if you want to return the user
// $smart_redirect = substr($smart_redirect, 1, strlen($smart_redirect)); // to the page they just viewed,
$smart_redirect = 'index.' . $phpEx; // and comment this line to prevent redirect to index page
$u_login_logout .= (!empty($smart_redirect)) ? '&redirect=' . $smart_redirect : '';
You see in the above, I have set it so you can decide whether to redirect to the index page (as it is at the moment), or, by commenting out that, and uncommenting the upper two lines, have it redirect to whatever page the user is viewing.
And note, these lines should be added before: } - the closure of the if statement!