Fixing the authentication not throwing 401