login: redirect to secure url before login

* login: Check if requested url is secure and if not then redirect to secure url before showing login. (closes #1883)
* accounts: Changes template so it uses secure url for login form's POST action.