API test server first

Test the server first, then send login info.