getting authentication to work