fixes authentication bug