some fixes in admin authentication