Fix storage of token by putting it in the session.