Fixed authentication flow