Updated to what I was told to be a working authentication system