added refresh for patients on accept invitation

@nicolashery ready for review. Can you look at line 35 and 50 in invitation.js and suggest what to do with the potential error