Fixing authentication issue