Fixed some minor bugs, and added warning for empty ClientId and/or ClientSecret