Refactors and fixes flow for invite accepting