Login user programmatically with ajax.