Move CSRF token obtaining code to login.cpp

The token used in various queries is now taken from project
configuration.