fix session bug. return to last page after signup/login
add unit and function tests for session controller