code refactored of records
require login functionality added and databases ignored