Fallback to alerts when toastr is not defined (for some reason toastr isn't working in login view on phonegap, works fine in browser..)