public async Task <IActionResult> AuthenticateUser([FromBody] UserModel userModel) { string token = await _userAuthService.AuthenticateUser(userModel.Username, userModel.Password); if (token == null) { return(BadRequest(new { message = "Username or password is incorrect!" })); } return(Ok(token)); }