Move redirect for logins to header.php