codes for registering the application