Whenever I restore a database all my logins associated with that database are removed. How can I avoid this ?
Logins reside in master database and users reside in non system databases. Logins does not come with user database backup. There is an exception for contained database, in which case there is no login mapped to user. Everything you need is contained in the user database as mentioned by @Nic and @Sepupic in comment section.
Read this for more details:
Basic SQL Server Security concepts – logins, users, and principals by Laurentiu Cristofor
Follow the process described here to copy logins to destination server.
You can also use PowerShell function to copy logins.
You'll most likely need to script out the creation of the users, and then run that script after you restore the database, as that information isn't inside the database backup.
partially contained databases setup can help in this....but be carefull because it can add vulnerability in case you have an account with DB_OWNER in this database, he will be able to add new accounts without your knowledge.