Extension re-written to handle authentication