made login action to capture userId in session