Finished the security Systeme, now clenaing some error handling