make checkAuthentication public