add basic profile functionality
fix 404 and 500 errors
fix bug and tests