More authentication logic