add condition statements for login/logout and for flash notices