added flash messages on successful login and logout