Cleanup authenticate method