add tests for userServices, changed alert to $window.alert in userServices