This is a simple auth server/client. It’s really basic so it’s easy to read and modify so it’s more applicable to your needs.
It’s also not that greatly written since i wrote it 4 days after i learned Python (hehe).
http://uploading.com/files/9a33d687/TaurisAuthServer.zip/
I hope someone finds some use for it.