add save token method and fix get method