Added logic to check user exist