Minor changes to authentication routines.