added environment variable js and updated login