Added a post-based login mechanism that's intended to be queried from the javascript.