Added refresh tokens to local storage.

Also fixed an incorrect error check.