fix user detail page and small refactors