Added code to store token in localStorage