Merge pull request #510 from bhariharan/unstable

Do not hand out RestClient when a logout is in progress
Fix for refresh token error in communities
Merge pull request #511 from bhariharan/master

Fix for refresh token error in communities
Merge branch 'master' into unstable