Add mechanism to protect links with csrf tokens.

+ Applied this mechanism to logout and rejudge links

Change-Id: Ibc14e74949f83322ad582cab09f946037834bc58