Restrick application, and refactoring oAuthClass.php