public async Task <IActionResult> Login([FromBody] UserModel userModel) { try { var response = await _userBLL.AuthenticateUser(userModel); if (response != null) { return(Ok(new { token = response.JwtToken })); } else { return(Unauthorized()); } } catch (Exception ex) { Log.Fatal(ex, ex.Message); throw; } }