Refactor sign out button to a proper form so it can handle redirects

UI counterpart of https://github.com/oaeproject/Hilary/pull/876