implemented login and inserting image