@NogDogAug 18.2018 — #Well, any login system is going to require server-side programming and data storage, so I'm not sure you want to post this in client-side/JavaScript. Depending on what server-side programming language (and perhaps associated framework) you want to use, there are plenty of ready-made solutions out there, or tutorials to help you build one yourself, if you prefer.
@smridhaAug 18.2018 — #are you using PHP for your server-side programming language. as nogdog mentioned there has lot of resource that will be helpful for you. but if you can't figure it out then you can ask here and I will try to help you about your problem.