Test for login using ajax