Easiest way would be find a source to examine (I'd suggest hybrid's super basic 5017 source so you don't have a bunch of poorly coded features dragging you down)
Examine how the login/auth server is coded, see how it interacts with the game server, look at how packets are handled in the source and then start writing your own.
Basically you will first just wanna get a working auth/login server, then get it connecting to the game server (Should be fairly easy to get to a point where you can at least log a character in), then work your way up from there adding other required packets, structures and systems as you add new features such as movement, jumping, monsters, attacking, npcs, etcetc.
It's not a simple project but if you are serious, there are lots of guides around here (like the one posted earlier) of things you should teach yourself before you get started. It's always good to see how other people have done sources and then NOT COPY them, but use them as guidelines of how it COULD be done.
The whole point of making your own source is 1) Learning 2) knowing your source inside and out, making it easier to add/remove/fix things over time 3) not end up with a bunch of poorly coded or incomplete features that plague many public sources.
Being your first source, it probably won't be better than some of the public sources BUT, having written it all yourself you will be able to fix it up over time as you learn more and make it better.
Good luck
P4N