Allow null type passed to getAccountsByType and fix get/setUserData functions
Added case to handle security exceptions, and an example program demonstrating usage