#22 added if statement to check whether user is logged in for file uploads