accounts: secure url for login form's POST action

* Changes template so it uses secure url for login form's POST action.

Signed-off-by: Mikael Karlsson <i8myshoes@gmail.com>
Co-authored-by: Jiri Kuncar <jiri.kuncar@cern.ch>
login: redirect to secure url before login

* Check if requested url is secure and if not then redirect to secure
  url before showing login.

Signed-off-by: Mikael Karlsson <i8myshoes@gmail.com>
global: fix for testing 401 after redirection

* Addresses issue with testing HTTP 401 status code after redirections
  to secure page.  (closses #1883)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>