Server Files for login , lobby, and gameserver + database

Hello Dear Unreal Community , I see many post on dedicated server and that not what I looking I want to ask
if its possible to code external server to loginserver lobby and gameserver + database and connect it to my UE4 games, and where to begin