Attempt at fixing authentication