Added code to set the user_token cookie and check for it on the edit note page