checking authentication during init