user login and validate api