added authentication, pythonisized more.