fixes authentication and auth stuff