The https check should come first

A similar change was made to ui.js in #252.
Removed trailing white space terds
Enables local cursor by default.
On touch devices the default should be to use a remote cursor.
Merge pull request #303 from retr0h/https-first

The https check should come first.
Merge pull request #304 from samhed/localcursor

Enables local cursor by default
Fix so that parentheses can be written from iOS devices.
    * changed the type of the input field (which is used for bringing up the
      on-screen keyboards on touch devices) from email to text
    * when typing in an input field of type email the user is not allowed to
      write parentheses on iOS devices, the keys are disabled.
    * tested on iOS 6, iOS 7 and Android 4.3.