update to authenticate extension in 1.6

some more error handling, removed global