Fixed API errors

Now authenticates properly