File management fix

Fixed the naming of a file name on the server, and added an extra
security check to ensure that the user is logged in.