Refactor user_controller
Fix unlink functions
Rearrange test files and add additional tests for user_controller