Added global variables DOMAIN and REDIRECT_URI

Replaced 127.0.0.1 with DOMAIN variable, and added REDIRECT_URI for flexible configuration.