Fixed upload only if logged in