Use the cookbook that you'll find here: https://sfdc.co/BotsGuide You'll need to gather the data from the prechat form, map it to the LiveChatTranscript and use the data in the FirstName slot to then create the greeting message. It's explained step by step in the document.
You cant access to "logged user" info. Only can use Prechat Form
The pre-chat form is rather limited when it comes to user information, Enrico Murru solved this issue with a lightning component: https://blog.enree.co/2018/11/salesforce-dealing-with-the-running-user-on-einstein-bot-dialogs.html