calling session_register("username") is probably not doing what you think it is doing. Try reading up on [man]session_register[/man] in the documentation.
instead of that, try:
1) get rid of the session_destory() line...i don't think you need that
2) instead of doing the session_register line, try storing a value in $SESSION
$_SESSION['logged_in'] = 1;
$_SESSION['username'] = $username;
3) Put this code in loginok.php:
session_start();
if ($_SESSION['logged_in'] !== 1) {
header('location: login.php');
exit();
}