vermas, Уже все исправил забыл один символ поставит
if (!$user_id) { header('Location: '. $home.'/login.php'); }