добавил проверку is authenticated