Move some authentication logic out of lib/Authenticate.php and
into gui-modules/login2.php. This reduces duplicate code for
training & regular cashiers and allows a session close call
before sending a drawer kick command to the printer