Finished the authentication - untested