Completed demo authentication controller,
added some shorthands to mainframe_helper.php