Fixing authentication issues