Removed old code
Added content functions
Better use of switch
Added a checkbox for keep alive login
Updated logic