fixing authentication checks

fixing authentication checks