some fixes in authentication setup