Closed if statement properly in application.html.erb (for rendering flash messages).