secret, user and scope bug fixed