Added login_required decorator to dajaxice functions and fixed ajax tests