Checks username and password with API