Fix first party cookie redirect with post submit (#6370)
* Fix first party cookie redirect with post submit
We had a bug in gmail and other browser based email programs trying to
use the one time login which would have their cookies blocked and the
sessions would be lost.
Changed up the process so it takes the sso request and then submits it
as a post request automatically via javascript. User has a button to do
the submission as well manually if anything goes wrong.
Also added CSRF protection to this.
* Fix style problems.
* Fixed todos, escaping, translation