add csrf token to settings and pairing views
use openssl pseudo random function
Merge pull request #1 from naviprojects/master

Issue #4023