@Badger, Thank you very much! This is really a valuable input.
With developer account, now it works fine. API is disabled with free account. For testing purposes, need to create a developer account.
API is an 'add on' feature for Professional Edition. You will not be able to enable that during your trial.
If you want to experiment with Connected Apps, you can sign up for a free Developer Edition at developerforce.com (https://developer.salesforce.com). This will be an Enterprise Edition org (with small data allowance).
Thanks @xeraa for helping in setting debug which eventually solved the problem 