Fetch interview question

Implement a login feature on a pre populated code. Make the code better and write tests.