Fixing broken login flow