Andor Tech interview question

OOPs Concept, Authentication and Aurthoization, also sample of code was shared and how I can improve that code as that code was written by Junior.