Added authentification flag for restricted network, an authentification check for external networks and some bug fixes