Completely rewrote SessionController