How to implement logout functionality in Admin LTE in yii2?

I am using Admin LTE in yii2 basic.

It is installed and working properly Now when the user logs in, instead of Alexander Pierce the name of user should be displayed, and user photo should be displayed instead of static photo and when user clicks on Sign Out then again Login screen should be displayed.

Create a form to logout like in basic project template: View code . And add to the button the css class of AdminLte Logout button.

You just need to configure your header layout:

<li class="dropdown user user-menu">

                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">

                        <?= empty($user->usr_image) ? 

                            Html::img('@web/images/user.png', ['class' => 'user-image img-circle', 'alt' => 'User image']) :

                            Html::img(\Yii::$app->params['frontendUrl'] . $user->usr_image, ['class' => 'user-image img-circle', 'alt' => 'User image']) ?>

                        <span class="hidden-xs"><?= $user->first_name . ' ' . $user->last_name ?></span>



// ... more here ...



<!-- Menu Footer-->

                        <li class="user-footer">

                            <div class="pull-left">

                                <a href="#" class="btn btn-default btn-flat">Profile</a>


                            <div class="pull-right">

                                <?= Html::a(

                                    'Sign out',


                                    ['data-method' => 'post', 'class' => 'btn btn-default btn-flat']

                                ) ?>