Fixing wrong variable referencing, caused login problems