modifying back end adding code for customer authorization