I have an angular application and I want to add functionality that stores user credentials in the browser so that when they leave the site and come back, they are automatically logged into their homepage. I am thinking to store the username and apitoken as cookies. And then retrieve those whenever somebody visits the homepage (if they exist). And then send those to the server to automatically log in the user. But I am wondering is this a good way to do it? Is this secure? If not could somebody explain a better way to do it and/or provide some resources for me to read how to do it? Thanks!