moved some logic around so profile page is not visible while editing profile