Fixes the authentication for users