Fix authentication system