[IMP]Changed the logic of onchange login, no need to test whether image exist or not, simply send d=identicon in query string so that if there is no image exist then it returns default avatar.