Among several authentication problems, preventing social engineering attacks using behavioural biometric approach has not received the required attention especially with focus on keystroke dynamics. This study aims to leverage the power of deep learning for more accurate and robust continuous authentication based on typing patterns. The proposed framework for this study utilized deep learning algorithm for behavioural biometrics authentication using Keystroke dynamics. The deep learning model was developed using Recurrent Neural Network (RNN) algorithm and was optimized was to obtain a better performance with Bayesian optimization which, eventually enhanced the model's accuracy. The dataset was split into training and testing in the model design phase and some hyperparameters such as dense, activation, batch size, sigmoid, filament, input size and epoch were used and optimized for building the deep learning algorithm. The RNN model is used to generate the evaluation metrics such as log loss, accuracy, precision and recall. The result presented the accuracy, precision, recall, and loss function as 100%, 100%, 100%, and 36% respectively for optimized model. The cost metrics yielded 0.0032, 0.0032, and 0.0006 MAE, MSE, and RMSE respectively. The developed KBB shows high level of social engineering attacks mitigation in comparison with the existing solution from the performance measure results.