Added AuthToken possibility and fixed some writing issues