Fix issue with None objects
Pass credentials as well (needed for the ajax workaround)