change loginUser in api.php to combine two statements with OR because they have the same body