Moved getAuthCode function to signin_functions.php