improve Login and Search api practice