adding redirect code for invitation sys