FIX apple modified login interface in agent.rb