How to fix this code ? PHP PDO : Hi all how to fix this code ??

    `				function userExists($pdow, $login)
    				{
    				$userQuery = "SELECT * FROM login u WHERE login=:user;";
    				$stmt = $pdow->prepare($userQuery);
    				$stmt->execute(array(':user' => $login));
    				return !!$stmt->fetch(PDO::FETCH_ASSOC);
    				}
    
    				$login = 'user';
    				$exists = userExists($pdow, $login);
    				if('$login')
    				$user= var_dump((bool) 'Exists');
    				{
    				echo "Login exsists!";
    				}`

I have two problems whit my code. 

First error:
Error with communique 'login exsists!'. I see this echo all the time in browser.

sequent error:
If i get communique 'login exsists!' my code still writes data to base.