Fixed bug when using register link from invite emails