added image support and added ajax to login