Adding logout option and showing messages