corrected update action for user and wrote a test for user