added user automatic login and local image upload