I'm pretty new to rails. I have a login system where, if data entered is valid, `session[:user]` is set. However, when later in `ApplicationController` I refer to `session[:user]` it will always give me an error, no matter the context, unless the line is commented out. Example:

```
user = session[:user]

```

The error it gives me is a generic "not working at this time" error, it doesn't actually say what's wrong.

Edit: Here's the error. It's a generic one.

```
We're sorry, but something went wrong.

We've been notified about this issue and we'll take a look at it shortly.

```

Also I tried many different variants and no matter what I stored in there it still gave me the error, it seemed. Here's my code:

Login processing:

```
session[:name] = valid_user.name
session[:password] = valid_user.password

```

Session validation (on every page view):

```
name = session[:name]
pass = session[:password]

```