added check if user is loged in before trying get user id