Tidied up LoginHandling.py