Fixed login issue

Not sure I'm entirely fond of this solution, however it functions perfectly