Login bugs fixed

Flag-based implementation: Form load causes flag keepAlive to false and
logout button sets it to true.  (keepAlive is also set to false upon
first initializing Ctrl) Exiting with red X works properly now.