fixed bug in ajax util
handled login ajax response