Getting Error on @flash

NoMethodError in User#login
TenReasons/app/views/user/login.html.erb where line #5 raised:
undefined method `[]' for nil:NilClass
Line 5: <% if @flash[:message] %>