get and recive code and token and store it