i have followed this document module 5.5 in this url \"http://www.ibm.com/developerworks/mobile/worklight/getting-started.html#authentication\" or ftp://public.dhe.ibm.com
Make sure that login() function is public and static. Check out a sample code of the training module you're working with.