fixed issue #71 user logs out after image upload fail