how to read a boolean axios response returned by axios.get( ) in Vue project

Would appreciate some help with this issue as I am new to Vue.js and axios development.
I made a project using Vue.js that allows the user to enter his/her login information and based on if it is correct or not, the user is redirected to the homepage or shown an error message.

I’m using a mySql db and checking the information against the db using php. Then I return a boolean value by doing: echo json_encode($response); within my php file - ajaxfile.php.
True for correct login and false for incorrect login. (code is below)

The vue project has a method called login (code below) which uses axios.get to connect to the php file. Now I can’t seem to retrieve the data that is inside the response object that it returns. I want to see if it is returning true or false so I can know if I should redirect or not. I tried, and others but none of them have returned something useful. I need a response that I can use.


login: function(){

				 axios.get('http://localhost/DbConnection/ajaxfile.php' , { // stored it in my htdocs
					    params: {
              username: this.username,
              password: this.password
          headers: {
        "Access-Control-Allow-Origin": "*",
        "Access-Control-Allow-Methods": "GET, POST, PATCH, PUT, DELETE, OPTIONS",
        "Access-Control-Allow-Headers": "Origin, Content-Type, X-Auth-Token"

      //console message for now until I get it to show true or false (then can redirect)
          .then((response) => {console.log(response);})
           .catch((error )=> {console.log(error);});

**\<!-- ajaxfile.php --\>  
include "connectToDB.php";  
## Enable CROSS-domain access  
 // You can decide if the origin in $\_SERVER['HTTP\_ORIGIN'] is something you want to allow, or as we do here, just allow all  
 header("Access-Control-Allow-Origin: {$\_SERVER['HTTP\_ORIGIN']}");  
 //No HTTP\_ORIGIN set, so we allow any. You can disallow if needed here  
 header("Access-Control-Allow-Origin: \*");  
header("Access-Control-Allow-Credentials: true");  
header("Access-Control-Max-Age: 600"); // cache for 10 minutes  
 header("Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT"); //Make sure you remove those you do not want to support  
 header("Access-Control-Allow-Headers: {$\_SERVER['HTTP\_ACCESS\_CONTROL\_REQUEST\_HEADERS']}");  
 //Just exit with 200 OK with the above headers for OPTIONS method  
#### Add AJAX code  
if (isset($\_GET['username'], $\_GET['password']))  
$user = $\_GET['username'];  
$password = $\_GET['password'];  
// $userData = mysqli\_query($con,"select \* from users WHERE ".$condition);  
// $userData = mysqli\_query($con,"select count from user WHERE ".$condition);  
$userData = mysqli\_query($con, "select count(username) from user where username = '".$user."' and password = '".$password."' LIMIT 0,1");  
// $response = array();  
/\* while($row = mysqli\_fetch\_assoc($userData)){  
 $response[] = $row;  
} \*/  
$response = false;  
$userData = $userData-\>fetch\_array();  
$count = intval($userData[0]);  
if ($count ==1) // user found  
 $response = true;  
 echo 'The username and password are correct! \<br\> ';  
 // echo 'user Data: ';   
 // echo $userData;  
 // echo json\_encode($response);  
 echo 'The username or password is incorrect';  
 // echo '\<a href= "invalidLoginMessage.php"\> \</a\>';  
 // throw new Exception ("Invalid username or password!");  
 echo json\_encode($response); //returns true or false  
// echo json\_encode ($count);