getting authentication working